LatNet Builder Manual
2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
|
To compute weight values for any of the supported weight types (product, order-dependent, POD, projection-dependent), it is possible to use the enter an expression function from the web user interface. But let us assuming that we want to do this by deriving a new class of weights from an existing one. Consider product weights that depend a single parameter \(\eta\) and that take the value
\[ \gamma_{\mathfrak u} = \prod_{j \in \mathfrak u} (1 / j^\eta) \]
for projection \(\mathfrak u\). First, we define the new weights class that overrides ProductWeights::getWeightForCoordinate() in latticetester/include/latticetester/MyWeights.h
:
Next, we declare a new member function in Parser::Weights in include/latbuilder/Parser/Weights.h
:
and implement it in src/Parser/Weights.cc
:
after, of course, adding the new header with:
We also need to add a conditional block in Parser::Weights::parse:
Then, after recompiling LatNet Builder, the new weights should be available to use by invoking latnetbuilder
with the option –weights MyWeights:1.5
, for example.