LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
loos::Weights Class Reference
Inheritance diagram for loos::Weights:
Inheritance graph
[legend]

Public Member Functions

virtual void addTraj (pTraj &traj)
 bind the provided pTraj to this instance of Weights
 
virtual const double get ()
 Return the weight for the current frame of the trajectory.
 
virtual const double get (const uint index)
 Return the weight for frame index of the trajectory.
 
virtual void set (double newWeight)
 Bind a new weight to the current frame.
 
virtual void set (double newWeight, const uint index)
 Bind a new weight to a particular frame.
 
virtual uint size ()
 Return the number of weights.
 
virtual void normalize ()
 Weights class to handle reweighting values computed from a trajectory.
 
virtual void accumulate ()
 Keep track of total weight used.
 
virtual void accumulate (const uint index)
 
virtual const double totalWeight ()
 Return the totalWeight, as tracked using accumulate.
 
virtual const double trajWeight ()
 Return the weight of the current trajectory.
 
virtual const double operator() ()
 calling nomenclature wraps get
 
virtual const double operator() (const uint index)
 
virtual void operator() (double newWeight)
 binding nomenclature wraps set
 
virtual void operator() (double newWeight, const uint index)
 
virtual void operator() (std::vector< double > &newWeights)
 set all weights from passed vector
 
virtual std::vector< double > weights ()
 Return the vector of weights.
 
 Weights (const std::vector< double > &weightsvec, pTraj &traj)
 
 Weights (const std::vector< double > &weightsvec)
 
 Weights (pTraj &traj)
 

Public Attributes

uint current_frame
 

Protected Attributes

std::vector< double > _weights
 
pTraj _traj
 
uint _num_weights
 
double _total
 
double _totalTraj
 

Constructor & Destructor Documentation

◆ Weights()

loos::Weights::Weights ( pTraj & traj)
inline

mostly here for function-based weights instances, such as UniformWeight (constant function).

Member Function Documentation

◆ accumulate() [1/2]

void loos::Weights::accumulate ( )
inlinevirtual

Keep track of total weight used.

Reimplemented in loos::UniformWeight.

◆ accumulate() [2/2]

void loos::Weights::accumulate ( const uint index)
inlinevirtual

Reimplemented in loos::UniformWeight.

◆ addTraj()

void loos::Weights::addTraj ( pTraj & traj)
virtual

bind the provided pTraj to this instance of Weights

Reimplemented in loos::WeightsFromFile.

◆ get() [1/2]

const double loos::Weights::get ( )
inlinevirtual

Return the weight for the current frame of the trajectory.

Reimplemented in loos::UniformWeight.

◆ get() [2/2]

const double loos::Weights::get ( const uint index)
inlinevirtual

Return the weight for frame index of the trajectory.

Reimplemented in loos::UniformWeight.

◆ normalize()

void loos::Weights::normalize ( )
inlinevirtual

Weights class to handle reweighting values computed from a trajectory.

Normalize the weights so they sum to 1

Reimplemented in loos::UniformWeight.

◆ operator()() [1/2]

const double loos::Weights::operator() ( )
inlinevirtual

calling nomenclature wraps get

Reimplemented in loos::UniformWeight.

◆ operator()() [2/2]

const double loos::Weights::operator() ( const uint index)
inlinevirtual

Reimplemented in loos::UniformWeight.

◆ weights()

std::vector< double > loos::Weights::weights ( )
inlinevirtual

Return the vector of weights.

Reimplemented in loos::UniformWeight.


The documentation for this class was generated from the following files: