00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00022
00024
00045 #ifndef math_funcs_h
00046 #define math_funcs_h
00047
00048 #include "matpackI.h"
00049 #include "mystring.h"
00050
00051
00052
00056
00057 Numeric first( ConstVectorView x );
00058
00059 Numeric last( ConstVectorView x );
00060
00061
00062
00066
00067 bool any( const ArrayOfIndex& x );
00068
00069
00070
00072
00074
00075 void linspace(
00076 Vector& x,
00077 const Numeric start,
00078 const Numeric stop,
00079 const Numeric step );
00080
00081 Vector linspace(
00082 const Numeric start,
00083 const Numeric stop,
00084 const Numeric step );
00085
00086 void nlinspace(
00087 Vector& x,
00088 const Numeric start,
00089 const Numeric stop,
00090 const Index n );
00091
00092 Vector nlinspace(
00093 const Numeric start,
00094 const Numeric stop,
00095 const Index n );
00096
00097 void nlogspace(
00098 Vector& x,
00099 const Numeric start,
00100 const Numeric stop,
00101 const Index n );
00102
00103 Vector nlogspace(
00104 const Numeric start,
00105 const Numeric stop,
00106 const Index n );
00107
00108
00109
00111
00113
00114 void interp_lin_vector( VectorView yi,
00115 ConstVectorView x,
00116 ConstVectorView y,
00117 ConstVectorView xi );
00118
00119 void interp_lin_matrix(
00120 MatrixView Yi,
00121 ConstVectorView x,
00122 ConstMatrixView Y,
00123 ConstVectorView xi );
00124
00125 Numeric interp_lin(
00126 ConstVectorView x,
00127 ConstVectorView y,
00128 const Numeric xi );
00129
00130
00131
00133
00135
00136 void check_if_bool( const Index& x, const String& x_name );
00137
00138 void check_if_in_range(
00139 const Numeric& x_low,
00140 const Numeric& x_high,
00141 const Numeric& x,
00142 const String& x_name );
00143
00144 void check_lengths( const Vector& x1, const String& x1_name,
00145 const Vector& x2, const String& x2_name );
00146
00147 void check_length_nrow( const Vector& x, const String& x_name,
00148 const Matrix& A, const String& A_name );
00149
00150 void check_length_ncol( const Vector& x, const String& x_name,
00151 const Matrix& A, const String& A_name );
00152
00153 void check_ncol_nrow( const Matrix& A, const String& A_name,
00154 const Matrix& B, const String& B_name );
00155
00156 #endif // math_funcs_h