Gemmi C++ API
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
gemmi::Binner Struct Reference

#include <binner.hpp>

Public Types

enum class  Method { EqualCount , Dstar , Dstar2 , Dstar3 }
 

Public Member Functions

void setup_from_1_d2 (int nbins, Method method, std::vector< double > &&inv_d2, const UnitCell *cell_)
 
template<typename DataProxy >
void setup (int nbins, Method method, const DataProxy &proxy, const UnitCell *cell_=nullptr, size_t col_idx=0)
 
void ensure_limits_are_set () const
 
int get_bin_from_1_d2 (double inv_d2)
 
int get_bin (const Miller &hkl)
 
int get_bin_from_1_d2_hinted (double inv_d2, int &hint) const
 
int get_bin_hinted (const Miller &hkl, int &hint) const
 
template<typename DataProxy >
std::vector< intget_bins (const DataProxy &proxy) const
 
std::vector< intget_bins_from_1_d2 (const double *inv_d2, size_t size) const
 
std::vector< intget_bins_from_1_d2 (const std::vector< double > &inv_d2) const
 
double dmin_of_bin (int n) const
 
double dmax_of_bin (int n) const
 
size_t size () const
 

Public Attributes

UnitCell cell
 
double min_1_d2
 
double max_1_d2
 
std::vector< doublelimits
 
std::vector< doublemids
 

Detailed Description

Definition at line 14 of file binner.hpp.

Member Enumeration Documentation

◆ Method

Enumerator
EqualCount 
Dstar 
Dstar2 
Dstar3 

Definition at line 15 of file binner.hpp.

Member Function Documentation

◆ setup_from_1_d2()

void gemmi::Binner::setup_from_1_d2 ( int  nbins,
Method  method,
std::vector< double > &&  inv_d2,
const UnitCell cell_ 
)
inline

Definition at line 22 of file binner.hpp.

◆ setup()

template<typename DataProxy >
void gemmi::Binner::setup ( int  nbins,
Method  method,
const DataProxy &  proxy,
const UnitCell cell_ = nullptr,
size_t  col_idx = 0 
)
inline

Definition at line 88 of file binner.hpp.

◆ ensure_limits_are_set()

void gemmi::Binner::ensure_limits_are_set ( ) const
inline

Definition at line 101 of file binner.hpp.

◆ get_bin_from_1_d2()

int gemmi::Binner::get_bin_from_1_d2 ( double  inv_d2)
inline

Definition at line 107 of file binner.hpp.

◆ get_bin()

int gemmi::Binner::get_bin ( const Miller hkl)
inline

Definition at line 114 of file binner.hpp.

◆ get_bin_from_1_d2_hinted()

int gemmi::Binner::get_bin_from_1_d2_hinted ( double  inv_d2,
int hint 
) const
inline

Definition at line 121 of file binner.hpp.

◆ get_bin_hinted()

int gemmi::Binner::get_bin_hinted ( const Miller hkl,
int hint 
) const
inline

Definition at line 133 of file binner.hpp.

◆ get_bins()

template<typename DataProxy >
std::vector< int > gemmi::Binner::get_bins ( const DataProxy &  proxy) const
inline

Definition at line 139 of file binner.hpp.

◆ get_bins_from_1_d2() [1/2]

std::vector< int > gemmi::Binner::get_bins_from_1_d2 ( const double inv_d2,
size_t  size 
) const
inline

Definition at line 148 of file binner.hpp.

◆ get_bins_from_1_d2() [2/2]

std::vector< int > gemmi::Binner::get_bins_from_1_d2 ( const std::vector< double > &  inv_d2) const
inline

Definition at line 157 of file binner.hpp.

◆ dmin_of_bin()

double gemmi::Binner::dmin_of_bin ( int  n) const
inline

Definition at line 161 of file binner.hpp.

◆ dmax_of_bin()

double gemmi::Binner::dmax_of_bin ( int  n) const
inline

Definition at line 164 of file binner.hpp.

◆ size()

size_t gemmi::Binner::size ( ) const
inline

Definition at line 168 of file binner.hpp.

Member Data Documentation

◆ cell

UnitCell gemmi::Binner::cell

Definition at line 170 of file binner.hpp.

◆ min_1_d2

double gemmi::Binner::min_1_d2

Definition at line 171 of file binner.hpp.

◆ max_1_d2

double gemmi::Binner::max_1_d2

Definition at line 172 of file binner.hpp.

◆ limits

std::vector<double> gemmi::Binner::limits

Definition at line 173 of file binner.hpp.

◆ mids

std::vector<double> gemmi::Binner::mids

Definition at line 174 of file binner.hpp.


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