23 #include <ns3/object.h> 
   24 #include <ns3/spectrum-converter.h> 
   25 #include <ns3/spectrum-value.h> 
   35 #define TOLERANCE 1e-6 
   53     void DoRun() 
override;
 
  112     std::vector<double> freqs;
 
  114     for (
int i = 1; i <= 5; i++)
 
  134     doubleValue = 1.12345600000000;
 
  136     v1[0] = 0.700539792840;
 
  137     v1[1] = -0.554277600423;
 
  138     v1[2] = 0.750309319469;
 
  139     v1[3] = -0.892299213192;
 
  140     v1[4] = 0.987045234885;
 
  142     v2[0] = 0.870441628737;
 
  143     v2[1] = 0.271419263880;
 
  144     v2[2] = 0.451557288312;
 
  145     v2[3] = 0.968992859395;
 
  146     v2[4] = -0.929186654705;
 
  148     v3[0] = 1.570981421577;
 
  149     v3[1] = -0.282858336543;
 
  150     v3[2] = 1.201866607781;
 
  151     v3[3] = 0.076693646203;
 
  152     v3[4] = 0.057858580180;
 
  154     v4[0] = -0.169901835897;
 
  155     v4[1] = -0.825696864302;
 
  156     v4[2] = 0.298752031158;
 
  157     v4[3] = -1.861292072588;
 
  158     v4[4] = 1.916231889590;
 
  160     v5[0] = 0.609778998275;
 
  161     v5[1] = -0.150441618292;
 
  162     v5[2] = 0.338807641695;
 
  163     v5[3] = -0.864631566028;
 
  164     v5[4] = -0.917149259846;
 
  166     v6[0] = 0.804809615846;
 
  167     v6[1] = -2.042145397125;
 
  168     v6[2] = 1.661603829438;
 
  169     v6[3] = -0.920852207053;
 
  170     v6[4] = -1.062267984465;
 
  172     v7[0] = 1.823995792840;
 
  173     v7[1] = 0.569178399577;
 
  174     v7[2] = 1.873765319469;
 
  175     v7[3] = 0.231156786808;
 
  176     v7[4] = 2.110501234885;
 
  178     v8[0] = -0.422916207160;
 
  179     v8[1] = -1.677733600423;
 
  180     v8[2] = -0.373146680531;
 
  181     v8[3] = -2.015755213192;
 
  182     v8[4] = -0.136410765115;
 
  184     v9[0] = 0.787025633505;
 
  185     v9[1] = -0.622706495860;
 
  186     v9[2] = 0.842939506814;
 
  187     v9[3] = -1.002458904856;
 
  188     v9[4] = 1.108901891403;
 
  190     v10[0] = 0.623557836569;
 
  191     v10[1] = -0.493368320987;
 
  192     v10[2] = 0.667858215604;
 
  193     v10[3] = -0.794244913190;
 
  194     v10[4] = 0.878579343459;
 
  233     tv7a = v1 + doubleValue;
 
  234     tv8a = v1 - doubleValue;
 
  235     tv9a = v1 * doubleValue;
 
  236     tv10a = v1 / doubleValue;
 
  247     tv7b = doubleValue + v1;
 
  248     tv8b = doubleValue - v1;
 
  249     tv9b = doubleValue * v1;
 
  250     tv10b = doubleValue / v1;
 
  289     std::vector<double> f1;
 
  290     for (
f = 3; 
f <= 7; 
f += 2)
 
  296     std::vector<double> f2;
 
  297     for (
f = 2; 
f <= 8; 
f += 1)
 
  342     t21b[0] = 3 * 0.25 + 5 * 0.5 + 1 * 0.25;
 
  343     t21b[1] = 1 * 0.25 + 2 * 0.5 + 4 * 0.25;
 
  344     t21b[2] = 4 * 0.25 + 6 * 0.5 + 3 * 0.25;
 
double f(double x, void *params)
 
Spectrum Converter TestSuite.
 
SpectrumConverterTestSuite()
 
bool MoreOrLessEqual(SpectrumValue x, SpectrumValue y)
Check that two SpectrumValue are equal within a tolerance.
 
SpectrumValue m_b
second SpectrumValue
 
~SpectrumValueTestCase() override
 
SpectrumValue m_a
first SpectrumValue
 
SpectrumValueTestCase(SpectrumValue a, SpectrumValue b, std::string name)
Constructor.
 
void DoRun() override
Implementation to actually run this TestCase.
 
Spectrum Value TestSuite.
 
Class which implements a converter between SpectrumValue which are defined over different SpectrumMod...
 
Ptr< SpectrumValue > Convert(Ptr< const SpectrumValue > vvf) const
Convert a particular ValueVsFreq instance to.
 
Set of values corresponding to a given SpectrumModel.
 
Ptr< const SpectrumModel > GetSpectrumModel() const
 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
 
#define NS_TEST_ASSERT_MSG_SPECTRUM_MODEL_EQ_TOL(actual, expected, tol, msg)
Test if two SpectrumModel instances are equal within a given tolerance.
 
#define NS_TEST_ASSERT_MSG_SPECTRUM_VALUE_EQ_TOL(actual, expected, tol, msg)
Test if two SpectrumValue instances are equal within a given tolerance.
 
Every class exported by the ns3 library is enclosed in the ns3 namespace.
 
double Norm(const SpectrumValue &x)
 
static SpectrumConverterTestSuite g_SpectrumConverterTestSuite
Static variable for test initialization.
 
static SpectrumValueTestSuite g_SpectrumValueTestSuite
Static variable for test initialization.