Commit d3750485 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

removing more scalar and complex sequences

parent 65aa0464
......@@ -4,7 +4,7 @@
#include "utility/Config.hpp"
#include "basics/Sample.hpp"
#include "mesh/Meshes.hpp"
#include "CVector.hpp"
typedef std::complex<double> Complex;
......@@ -12,10 +12,6 @@ static double abs(const Complex &complex) {
return sqrt(pow(complex.real(), 2) + pow(complex.imag(), 2));
}
typedef std::vector<Scalar> ScalarSequence1D;
typedef std::vector<Complex> ComplexSequence1D;
typedef std::vector<std::vector<Complex>> ComplexSequence2D;
typedef std::vector<std::vector<Scalar>> ScalarSequence2D;
......@@ -121,7 +117,7 @@ public:
virtual string Name() const override { return "DummyGenerator"; };
};
class ScalarSequence1DDummy : public SampleGenerator<ScalarSequence1D> {
class ScalarSequence1DDummy : public SampleGenerator<RVector> {
public:
ScalarSequence1DDummy(Meshes &meshes) : SampleGenerator(meshes) {}
......@@ -132,7 +128,7 @@ public:
virtual string Name() const override { return "DummyGenerator"; };
};
class ComplexSequence1DDummy : public SampleGenerator<ComplexSequence1D> {
class ComplexSequence1DDummy : public SampleGenerator<CVector> {
public:
ComplexSequence1DDummy(Meshes &meshes) : SampleGenerator(meshes) {}
......
......@@ -24,9 +24,9 @@ public:
SampleGenerator<Tensor> *tensorGenerator;
SampleGenerator<ScalarSequence1D> *scalarSequence1DGenerator;
SampleGenerator<RVector> *scalarSequence1DGenerator;
SampleGenerator<ComplexSequence1D> *complexSequence1DGenerator;
SampleGenerator<CVector> *complexSequence1DGenerator;
SampleGenerator<ScalarSequence2D> *scalarSequence2DGenerator;
......
......@@ -73,11 +73,11 @@ public:
};
};
class NormalDistributionScalarSequence1D : public SampleGenerator<ScalarSequence1D> {
class NormalDistributionScalarSequence1D : public SampleGenerator<RVector> {
private:
NormalDistribution normalDist;
ScalarSequence1D sample;
RVector sample;
void drawSample(const SampleID &id) override {
for (int i = 0; i < sample.size(); i++) {
......@@ -95,7 +95,7 @@ public:
sample.resize(sizeN);
}
ScalarSequence1D EvalSample() override {
RVector EvalSample() override {
return sample;
}
......@@ -104,11 +104,11 @@ public:
};
};
class NormalDistributionComplexSequence1D : public SampleGenerator<ComplexSequence1D> {
class NormalDistributionComplexSequence1D : public SampleGenerator<CVector> {
private:
ComplexNormalDistribution normalDist;
ComplexSequence1D sample;
CVector sample;
void drawSample(const SampleID &id) override {
for (int i = 0; i < sample.size(); i++) {
......@@ -126,7 +126,7 @@ public:
sample.resize(sizeN);
}
ComplexSequence1D EvalSample() override {
CVector EvalSample() override {
return sample;
}
......
......@@ -79,7 +79,7 @@ TEST_F(TestCirculantEmbedding1D, TestPaddingDummyExample) {
}
TEST_F(TestCirculantEmbedding1D, TestGenerateFieldf) {
ComplexSequence1D Xf;
CVector Xf;
Xf = generator->generateField(SampleID());
EXPECT_EQ(Xf.size(), 2 * (*meshes)[2].CellCount() - 1);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment