Defines product weights.
More...
#include <latticetester/WeightsProduct.h>
|
virtual void | format (std::ostream &os) const |
| Static factory method; create a WeightsProduct object by parsing XML data.
|
|
|
std::ostream & | operator<< (std::ostream &os, const Weights &o) |
| Identifies the type of weights, formats them and outputs them on os .
|
|
Defines product weights.
The weight of a projection is equal to the product of the individual weights of each coordinate involved.
◆ WeightsProduct()
LatticeTester::WeightsProduct::WeightsProduct |
( |
Weight | defaultWeight = 0.0 | ) |
|
|
explicit |
Constructs product weights with a default weight.
- Parameters
-
defaultWeight | Default weight. |
◆ ~WeightsProduct()
virtual LatticeTester::WeightsProduct::~WeightsProduct |
( |
| ) |
|
|
inlinevirtual |
◆ format()
void LatticeTester::WeightsProduct::format |
( |
std::ostream & | os | ) |
const |
|
protectedvirtual |
Static factory method; create a WeightsProduct
object by parsing XML data.
Identifies the type of weights, formats them and outputs them on os
.
Subclasses that implement Weights should identify themselves in the output.
Implements LatticeTester::Weights.
◆ getDefaultWeight()
virtual Weight LatticeTester::WeightsProduct::getDefaultWeight |
( |
| ) |
const |
|
inlinevirtual |
◆ getWeight()
Weight LatticeTester::WeightsProduct::getWeight |
( |
const Coordinates & | projection | ) |
const |
|
virtual |
◆ getWeightForCoordinate()
virtual Weight LatticeTester::WeightsProduct::getWeightForCoordinate |
( |
Coordinates::size_type | coordinate | ) |
const |
|
inlinevirtual |
Returns the weight associated to the given coordinate.
◆ getWeights()
virtual const std::vector< Weight > & LatticeTester::WeightsProduct::getWeights |
( |
| ) |
const |
|
inlinevirtual |
◆ multiplyWeights()
void LatticeTester::WeightsProduct::multiplyWeights |
( |
Weight | c | ) |
|
|
inline |
Multiply each weight by a constant.
◆ setDefaultWeight()
virtual void LatticeTester::WeightsProduct::setDefaultWeight |
( |
Weight | weight | ) |
|
|
inlinevirtual |
Sets the default weight of all coordinates for which a weight has not been set explicitly set using setWeightForCoordinate().
◆ setWeightForCoordinate()
void LatticeTester::WeightsProduct::setWeightForCoordinate |
( |
Coordinates::size_type | coordinate, |
|
|
Weight | weight ) |
|
virtual |
Sets the weight for the coordinate specified by coordinate
.
◆ m_defaultWeight
Weight LatticeTester::WeightsProduct::m_defaultWeight |
|
protected |
◆ m_weights
std::vector<Weight> LatticeTester::WeightsProduct::m_weights |
|
protected |
The documentation for this class was generated from the following files: