Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
lfit_test.cc File Reference
#include <gtest/gtest.h>
#include <lfit.H>
#include <ah-random.H>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <limits>
#include <random>
Include dependency graph for lfit_test.cc:

Go to the source code of this file.

Classes

class  LFitTest
 

Functions

 TEST_F (LFitTest, PerfectLineFit)
 
 TEST_F (LFitTest, HorizontalLine)
 
 TEST_F (LFitTest, VerticalIncrement)
 
 TEST_F (LFitTest, NegativeSlope)
 
 TEST_F (LFitTest, SlightNoise)
 
 TEST_F (LFitTest, ModerateNoise)
 
 TEST_F (LFitTest, PredictWithinRange)
 
 TEST_F (LFitTest, PredictExtrapolation)
 
 TEST_F (LFitTest, PredictMultipleValues)
 
 TEST_F (LFitTest, TwoPoints)
 
 TEST_F (LFitTest, LargeNumbers)
 
 TEST_F (LFitTest, SmallNumbers)
 
 TEST_F (LFitTest, NegativeValues)
 
 TEST_F (LFitTest, RSquaredRange)
 
 TEST_F (LFitTest, ResidualSum)
 
 TEST_F (LFitTest, MSECalculation)
 
 TEST_F (LFitTest, UniformSpacing)
 
 TEST_F (LFitTest, NonUniformSpacing)
 
 TEST_F (LFitTest, ReversedOrder)
 
 TEST_F (LFitTest, LargeDataset)
 
 TEST_F (LFitTest, ManyPredictions)
 
 TEST_F (LFitTest, RepeatConstruction)
 
 TEST_F (LFitTest, DifferentSlopes)
 
 TEST_F (LFitTest, DifferentIntercepts)
 
 TEST_F (LFitTest, AnExactLineHasNoErrors)
 
 TEST_F (LFitTest, TheErrorsComeFromTheResiduals)
 
 TEST_F (LFitTest, TwoPointsGiveNoStandardDeviationOfTheErrors)
 
 TEST_F (LFitTest, EmptyArraysThrow)
 
 TEST_F (LFitTest, ArraysOfDifferentSizesThrow)
 
 TEST_F (LFitTest, ItsErrorsAreRuntimeErrors)
 
 TEST_F (LFitTest, TheFitIsThatOfGsl)
 

Function Documentation

◆ TEST_F() [1/31]

TEST_F ( LFitTest  ,
AnExactLineHasNoErrors   
)

Definition at line 359 of file lfit_test.cc.

References LFit::mse, LFit::sigma, LFit::sumsq, and y.

◆ TEST_F() [2/31]

TEST_F ( LFitTest  ,
ArraysOfDifferentSizesThrow   
)

Definition at line 433 of file lfit_test.cc.

References y.

◆ TEST_F() [3/31]

TEST_F ( LFitTest  ,
DifferentIntercepts   
)

Definition at line 340 of file lfit_test.cc.

References approx_equal(), LFit::c, and y1().

◆ TEST_F() [4/31]

TEST_F ( LFitTest  ,
DifferentSlopes   
)

Definition at line 325 of file lfit_test.cc.

References approx_equal(), LFit::m, and y1().

◆ TEST_F() [5/31]

TEST_F ( LFitTest  ,
EmptyArraysThrow   
)

Definition at line 423 of file lfit_test.cc.

References y.

◆ TEST_F() [6/31]

TEST_F ( LFitTest  ,
HorizontalLine   
)

Definition at line 45 of file lfit_test.cc.

References approx_equal(), LFit::c, LFit::m, and y.

◆ TEST_F() [7/31]

TEST_F ( LFitTest  ,
ItsErrorsAreRuntimeErrors   
)

Definition at line 449 of file lfit_test.cc.

References y.

◆ TEST_F() [8/31]

TEST_F ( LFitTest  ,
LargeDataset   
)

Definition at line 277 of file lfit_test.cc.

References Aleph::Array< T >::append(), approx_equal(), LFit::c, LFit::m, LFit::r2, and y.

◆ TEST_F() [9/31]

TEST_F ( LFitTest  ,
LargeNumbers   
)

Definition at line 167 of file lfit_test.cc.

References approx_equal(), LFit::m, and y.

◆ TEST_F() [10/31]

TEST_F ( LFitTest  ,
ManyPredictions   
)

Definition at line 294 of file lfit_test.cc.

References approx_equal(), pred, LFit::predict(), and y.

◆ TEST_F() [11/31]

TEST_F ( LFitTest  ,
ModerateNoise   
)

Definition at line 99 of file lfit_test.cc.

References LFit::m, LFit::r2, and y.

◆ TEST_F() [12/31]

TEST_F ( LFitTest  ,
MSECalculation   
)

Definition at line 223 of file lfit_test.cc.

References LFit::mse, LFit::sigma, and y.

◆ TEST_F() [13/31]

TEST_F ( LFitTest  ,
NegativeSlope   
)

Definition at line 69 of file lfit_test.cc.

References approx_equal(), LFit::c, LFit::m, LFit::r2, and y.

◆ TEST_F() [14/31]

TEST_F ( LFitTest  ,
NegativeValues   
)

Definition at line 187 of file lfit_test.cc.

References approx_equal(), LFit::m, and y.

◆ TEST_F() [15/31]

TEST_F ( LFitTest  ,
NonUniformSpacing   
)

Definition at line 252 of file lfit_test.cc.

References approx_equal(), LFit::m, and y.

◆ TEST_F() [16/31]

TEST_F ( LFitTest  ,
PerfectLineFit   
)

Definition at line 31 of file lfit_test.cc.

References approx_equal(), LFit::c, LFit::m, LFit::r2, LFit::sumsq, and y.

◆ TEST_F() [17/31]

TEST_F ( LFitTest  ,
PredictExtrapolation   
)

Definition at line 126 of file lfit_test.cc.

References approx_equal(), pred, LFit::predict(), and y.

◆ TEST_F() [18/31]

TEST_F ( LFitTest  ,
PredictMultipleValues   
)

Definition at line 137 of file lfit_test.cc.

References approx_equal(), pred, LFit::predict(), and y.

◆ TEST_F() [19/31]

TEST_F ( LFitTest  ,
PredictWithinRange   
)

Definition at line 115 of file lfit_test.cc.

References approx_equal(), pred, LFit::predict(), and y.

◆ TEST_F() [20/31]

TEST_F ( LFitTest  ,
RepeatConstruction   
)

Definition at line 308 of file lfit_test.cc.

References approx_equal(), LFit::c, LFit::m, and y.

◆ TEST_F() [21/31]

TEST_F ( LFitTest  ,
ResidualSum   
)

Definition at line 212 of file lfit_test.cc.

References approx_equal(), LFit::sumsq, and y.

◆ TEST_F() [22/31]

TEST_F ( LFitTest  ,
ReversedOrder   
)

Definition at line 262 of file lfit_test.cc.

References approx_equal(), LFit::c, LFit::m, and y.

◆ TEST_F() [23/31]

TEST_F ( LFitTest  ,
RSquaredRange   
)

Definition at line 201 of file lfit_test.cc.

References LFit::r2, and y.

◆ TEST_F() [24/31]

TEST_F ( LFitTest  ,
SlightNoise   
)

Definition at line 86 of file lfit_test.cc.

References approx_equal(), LFit::c, LFit::m, LFit::r2, and y.

◆ TEST_F() [25/31]

TEST_F ( LFitTest  ,
SmallNumbers   
)

Definition at line 177 of file lfit_test.cc.

References approx_equal(), LFit::m, and y.

◆ TEST_F() [26/31]

TEST_F ( LFitTest  ,
TheErrorsComeFromTheResiduals   
)

◆ TEST_F() [27/31]

TEST_F ( LFitTest  ,
TheFitIsThatOfGsl   
)

Definition at line 553 of file lfit_test.cc.

◆ TEST_F() [28/31]

TEST_F ( LFitTest  ,
TwoPoints   
)

Definition at line 156 of file lfit_test.cc.

References approx_equal(), LFit::m, LFit::r2, and y.

◆ TEST_F() [29/31]

TEST_F ( LFitTest  ,
TwoPointsGiveNoStandardDeviationOfTheErrors   
)

Definition at line 400 of file lfit_test.cc.

References LFit::mse, LFit::sigma, LFit::sumsq, and y.

◆ TEST_F() [30/31]

TEST_F ( LFitTest  ,
UniformSpacing   
)

◆ TEST_F() [31/31]

TEST_F ( LFitTest  ,
VerticalIncrement   
)

Definition at line 56 of file lfit_test.cc.

References approx_equal(), LFit::c, LFit::m, LFit::r2, and y.