Tudat/Mathematics/NumericalQuadrature/UnitTests/unitTestTrapezoidQuadrature.cpp
// Function to create linearly spaced data.
Function to create linearly spaced data.
Function to create linearly spaced data .
std::vector< double > linspace( double start, double end, int numberOfSamples )
{
    double spacing = ( end - start ) / ( static_cast< double >( numberOfSamples - 1 ) );
    std::vector< double > vector(0);
    for( int i = 0 ; i < numberOfSamples ; i++ )
    {
        vector.push_back( start + static_cast< double >( i ) * spacing );
    }
    return vector;
}
std :: vector < double > linspace ( double start , double end , int numberOfSamples ) { double spacing = ( end - start ) / ( static_cast < double > ( numberOfSamples - 1 ) ) ; std :: vector < double > vector ( 0 ) ; for ( int i = 0 ; i < numberOfSamples ; i ++ ) { vector . push_back ( start + static_cast < double > ( i ) * spacing ) ; } return vector ; }
Function to create linearly spaced data.
Function to create linearly spaced data .