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, bool with_mids=false, 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 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 16 of file binner.hpp.

Member Enumeration Documentation

◆ Method

Enumerator
EqualCount 
Dstar 
Dstar2 
Dstar3 

Definition at line 17 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 24 of file binner.hpp.

◆ setup()

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

Definition at line 82 of file binner.hpp.

◆ ensure_limits_are_set()

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

Definition at line 104 of file binner.hpp.

◆ get_bin_from_1_d2()

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

Definition at line 110 of file binner.hpp.

◆ get_bin()

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

Definition at line 117 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 124 of file binner.hpp.

◆ get_bin_hinted()

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

Definition at line 136 of file binner.hpp.

◆ get_bins()

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

Definition at line 142 of file binner.hpp.

◆ get_bins_from_1_d2()

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

Definition at line 151 of file binner.hpp.

◆ dmin_of_bin()

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

Definition at line 160 of file binner.hpp.

◆ dmax_of_bin()

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

Definition at line 163 of file binner.hpp.

◆ size()

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

Definition at line 167 of file binner.hpp.

Member Data Documentation

◆ cell

UnitCell gemmi::Binner::cell

Definition at line 169 of file binner.hpp.

◆ min_1_d2

double gemmi::Binner::min_1_d2

Definition at line 170 of file binner.hpp.

◆ max_1_d2

double gemmi::Binner::max_1_d2

Definition at line 171 of file binner.hpp.

◆ limits

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

Definition at line 172 of file binner.hpp.

◆ mids

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

Definition at line 173 of file binner.hpp.


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