Definition at line 66 of file IPositionBuilder.h.
|
std::unique_ptr< Interference1DLattice > | m_iff |
|
◆ Lattice1DPositionBuilder()
Lattice1DPositionBuilder::Lattice1DPositionBuilder |
( |
const Interference1DLattice * |
p_iff | ) |
|
◆ ~Lattice1DPositionBuilder()
Lattice1DPositionBuilder::~Lattice1DPositionBuilder |
( |
| ) |
|
|
overridedefault |
◆ generatePositions()
std::vector< std::vector< double > > IPositionBuilder::generatePositions |
( |
double |
layer_size, |
|
|
double |
density = 0.0 |
|
) |
| const |
|
inherited |
Definition at line 29 of file IPositionBuilder.cpp.
36 std::random_device rd;
37 std::mt19937 gen(rd());
38 std::normal_distribution<double> dis(0.0, std::sqrt(pos_var));
39 for (
auto& position : positions) {
40 for (
auto& coordinate : position)
41 coordinate += dis(gen);
virtual std::vector< std::vector< double > > generatePositionsImpl(double layer_size, double density=0.0) const =0
virtual double positionVariance() const =0
References IPositionBuilder::generatePositionsImpl(), and IPositionBuilder::positionVariance().
◆ generatePositionsImpl()
std::vector< std::vector< double > > Lattice1DPositionBuilder::generatePositionsImpl |
( |
double |
layer_size, |
|
|
double |
density = 0.0 |
|
) |
| const |
|
overrideprivatevirtual |
Implements IPositionBuilder.
Definition at line 104 of file IPositionBuilder.cpp.
107 const double length =
m_iff->length();
108 const double xi =
m_iff->xi();
113 length == 0.0 ? 2 :
static_cast<unsigned>(2.0 * layer_size * std::sqrt(2.0) / length);
115 return Generate2DLatticePoints(length, 0.0, 0.0, xi, n1, 1u);
References m_iff.
◆ positionVariance()
double Lattice1DPositionBuilder::positionVariance |
( |
| ) |
const |
|
overrideprivatevirtual |
◆ m_iff
std::unique_ptr<Interference1DLattice> Lattice1DPositionBuilder::m_iff |
|
private |
The documentation for this class was generated from the following files: