Gemmi C++ API
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
gemmi::GridBase< T > Struct Template Reference

A common subset of Grid and ReciprocalGrid. More...

#include <grid.hpp>

Inheritance diagram for gemmi::GridBase< T >:
[legend]

Classes

struct  iterator
 
struct  Point
 grid coordinates (modulo size) and a pointer to value More...
 

Public Types

using Tsum = typename std::conditional< std::is_integral< T >::value, std::ptrdiff_t, T >::type
 

Public Member Functions

void check_not_empty () const
 
void set_size_without_checking (int nu_, int nv_, int nw_)
 
T get_value_q (int u, int v, int w) const
 
size_t point_to_index (const Point &p) const
 
Point index_to_point (size_t idx)
 
void fill (T value)
 
Tsum sum () const
 
iterator begin ()
 
iterator end ()
 
- Public Member Functions inherited from gemmi::GridMeta
size_t point_count () const
 
Fractional get_fractional (int u, int v, int w) const
 u,v,w are not normalized here
 
Position get_position (int u, int v, int w) const
 
std::vector< GridOpget_scaled_ops_except_id () const
 
size_t index_q (int u, int v, int w) const
 Quick(est) index function, but works only if 0 <= u < nu, etc.
 
size_t index_n (int u, int v, int w) const
 Faster than index_s(), but works only if -nu <= u < 2*nu, etc.
 
size_t index_n_ref (int &u, int &v, int &w) const
 The same as index_n(), but modifies arguments.
 
size_t index_near_zero (int u, int v, int w) const
 Faster than index_n(), but works only if -nu <= u < nu, etc.
 

Public Attributes

std::vector< Tdata
 
- Public Attributes inherited from gemmi::GridMeta
UnitCell unit_cell
 
const SpaceGroupspacegroup = nullptr
 
int nu = 0
 
int nv = 0
 
int nw = 0
 
AxisOrder axis_order = AxisOrder::Unknown
 

Detailed Description

template<typename T>
struct gemmi::GridBase< T >

A common subset of Grid and ReciprocalGrid.

Definition at line 228 of file grid.hpp.

Member Typedef Documentation

◆ Tsum

template<typename T >
using gemmi::GridBase< T >::Tsum = typename std::conditional<std::is_integral<T>::value, std::ptrdiff_t, T>::type

Definition at line 266 of file grid.hpp.

Member Function Documentation

◆ check_not_empty()

template<typename T >
void gemmi::GridBase< T >::check_not_empty ( ) const
inline

Definition at line 237 of file grid.hpp.

◆ set_size_without_checking()

template<typename T >
void gemmi::GridBase< T >::set_size_without_checking ( int  nu_,
int  nv_,
int  nw_ 
)
inline

Definition at line 242 of file grid.hpp.

◆ get_value_q()

template<typename T >
T gemmi::GridBase< T >::get_value_q ( int  u,
int  v,
int  w 
) const
inline

Definition at line 247 of file grid.hpp.

◆ point_to_index()

template<typename T >
size_t gemmi::GridBase< T >::point_to_index ( const Point p) const
inline

Definition at line 249 of file grid.hpp.

◆ index_to_point()

template<typename T >
Point gemmi::GridBase< T >::index_to_point ( size_t  idx)
inline

Definition at line 251 of file grid.hpp.

◆ fill()

template<typename T >
void gemmi::GridBase< T >::fill ( T  value)
inline

Definition at line 261 of file grid.hpp.

◆ sum()

template<typename T >
Tsum gemmi::GridBase< T >::sum ( ) const
inline

Definition at line 268 of file grid.hpp.

◆ begin()

template<typename T >
iterator gemmi::GridBase< T >::begin ( )
inline

Definition at line 294 of file grid.hpp.

◆ end()

template<typename T >
iterator gemmi::GridBase< T >::end ( )
inline

Definition at line 295 of file grid.hpp.

Member Data Documentation

◆ data

template<typename T >
std::vector<T> gemmi::GridBase< T >::data

Definition at line 235 of file grid.hpp.


The documentation for this struct was generated from the following file: