SAGA API
v9.6
|
#include <mat_tools.h>
Public Types | |
typedef double const * | const_iterator |
Public Member Functions | |
CSG_Vector (void) | |
virtual | ~CSG_Vector (void) |
CSG_Vector (const CSG_Vector &Vector) | |
bool | Create (const CSG_Vector &Vector) |
CSG_Vector (sLong n, const double *Data=NULL) | |
bool | Create (sLong n, const double *Data=NULL) |
bool | Destroy (void) |
bool | Set_Rows (sLong nRows) |
bool | Add_Rows (sLong nRows) |
bool | Del_Rows (sLong nRows) |
bool | Add_Row (double Value=0.) |
bool | Del_Row (sLong Row=-1) |
sLong | Get_Row_Count (void) const |
sLong | Get_Size (void) const |
size_t | Get_uSize (void) const |
int | Get_N (void) const |
double * | Get_Data (void) const |
double | Get_Data (sLong x) const |
double | operator() (sLong x) const |
double & | operator[] (sLong x) |
double & | operator[] (size_t x) |
double & | operator[] (int x) |
const double & | operator[] (sLong x) const |
const double & | operator[] (size_t x) const |
const double & | operator[] (int x) const |
operator const double * (void) const | |
CSG_String | to_String (int Width=-1, int Precision=-1, bool bScientific=false, const SG_Char *Separator=NULL) const |
bool | from_String (const CSG_String &String) |
bool | is_Null (void) const |
bool | is_Equal (const CSG_Vector &Vector) const |
bool | is_Collinear (const CSG_Vector &Vector) const |
bool | Assign (double Scalar) |
bool | Assign (const CSG_Vector &Vector) |
bool | Add (double Scalar) |
bool | Add (const CSG_Vector &Vector) |
bool | Subtract (const CSG_Vector &Vector) |
bool | Multiply (double Scalar) |
bool | Multiply (const CSG_Vector &Vector) |
bool | Multiply_Cross (const CSG_Vector &Vector) |
double | Multiply_Scalar (const CSG_Vector &Vector) const |
bool | Multiply (const class CSG_Matrix &Matrix) |
bool | operator== (const CSG_Vector &Vector) const |
bool | operator!= (const CSG_Vector &Vector) const |
CSG_Vector & | operator= (double Scalar) |
CSG_Vector & | operator= (const CSG_Vector &Vector) |
CSG_Vector & | operator+= (double Scalar) |
CSG_Vector & | operator+= (const CSG_Vector &Vector) |
CSG_Vector & | operator-= (double Scalar) |
CSG_Vector & | operator-= (const CSG_Vector &Vector) |
CSG_Vector & | operator*= (double Scalar) |
CSG_Vector & | operator*= (const CSG_Vector &Vector) |
CSG_Vector & | operator*= (const class CSG_Matrix &Matrix) |
CSG_Vector | operator+ (double Scalar) const |
CSG_Vector | operator+ (const CSG_Vector &Vector) const |
CSG_Vector | operator- (double Scalar) const |
CSG_Vector | operator- (const CSG_Vector &Vector) const |
CSG_Vector | operator* (double Scalar) const |
double | operator* (const CSG_Vector &Vector) const |
bool | Set_Zero (void) |
bool | Set_Unity (void) |
bool | Flip_Values (void) |
bool | Sort (bool bAscending=true) |
double | Get_Length (void) const |
CSG_Vector | Get_Scalar_Product (const CSG_Vector &Vector) const |
CSG_Vector | Get_Cross_Product (const CSG_Vector &Vector) const |
double | Get_Angle (const CSG_Vector &Vector) const |
CSG_Vector | Get_Unity (void) const |
const_iterator | begin (void) const |
const_iterator | end (void) const |
const_iterator | cbegin (void) const |
const_iterator | cend (void) const |
Definition at line 359 of file mat_tools.h.
typedef double const* CSG_Vector::const_iterator |
Definition at line 444 of file mat_tools.h.
CSG_Vector::CSG_Vector | ( | void | ) |
Definition at line 74 of file mat_matrix.cpp.
References CSG_Array::Create().
|
virtual |
Definition at line 125 of file mat_matrix.cpp.
References Destroy().
CSG_Vector::CSG_Vector | ( | const CSG_Vector & | Vector | ) |
Definition at line 80 of file mat_matrix.cpp.
References CSG_Array::Create(), and Create().
CSG_Vector::CSG_Vector | ( | sLong | n, |
const double * | Data = NULL |
||
) |
Definition at line 93 of file mat_matrix.cpp.
References CSG_Array::Create(), and Create().
bool CSG_Vector::Add | ( | const CSG_Vector & | Vector | ) |
Definition at line 362 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
bool CSG_Vector::Add | ( | double | Scalar | ) |
Definition at line 346 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by operator+(), operator+=(), operator-(), and operator-=().
bool CSG_Vector::Add_Row | ( | double | Value = 0. | ) |
Definition at line 188 of file mat_matrix.cpp.
References Get_Data(), Get_Size(), and CSG_Array::Inc_Array().
Referenced by CSG_Spline::Add(), CSG_Trend_Polynom::Add_Data(), CSG_Regression_Weighted::Add_Sample(), CSG_Unique_String_Statistics::Add_Value(), CSG_Unique_Number_Statistics::Add_Value(), CSG_Regression::Add_Values(), CSG_Natural_Breaks::Create(), from_String(), and CSG_Matrix::from_String().
bool CSG_Vector::Add_Rows | ( | sLong | nRows | ) |
Definition at line 156 of file mat_matrix.cpp.
References Get_Data(), Get_Size(), and CSG_Array::Set_Array().
Referenced by CSG_Trend_Polynom::Set_Data(), and Set_Rows().
bool CSG_Vector::Assign | ( | const CSG_Vector & | Vector | ) |
Definition at line 333 of file mat_matrix.cpp.
References Create(), Get_Data(), and Get_Size().
bool CSG_Vector::Assign | ( | double | Scalar | ) |
Definition at line 317 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by Create(), Multiply(), and operator=().
|
inline |
Definition at line 446 of file mat_tools.h.
|
inline |
Definition at line 448 of file mat_tools.h.
|
inline |
Definition at line 449 of file mat_tools.h.
bool CSG_Vector::Create | ( | const CSG_Vector & | Vector | ) |
Definition at line 87 of file mat_matrix.cpp.
References Assign().
Referenced by CSG_Spline::_Create(), CSG_Regression_Multiple::_Get_Regression(), Assign(), CSG_Natural_Breaks::Create(), CSG_Thin_Plate_Spline::Create(), CSG_Vector(), CSG_Cluster_Analysis::Execute(), CSG_Matrix::Get_Col(), CSG_KDTree_2D::Get_Duplicates(), CSG_KDTree_3D::Get_Duplicates(), CSG_KDTree_2D::Get_Nearest_Points(), CSG_KDTree_3D::Get_Nearest_Points(), CSG_Regression_Multiple::Get_Residuals(), CSG_Grid::Get_Row(), CSG_Matrix::Get_Row(), CSG_Matrix::Multiply(), CSG_Regression::Set_Values(), Set_Zero(), and SG_Matrix_Triangular_Decomposition().
bool CSG_Vector::Create | ( | sLong | n, |
const double * | Data = NULL |
||
) |
Definition at line 100 of file mat_matrix.cpp.
References Destroy(), Get_Data(), and CSG_Array::Set_Array().
bool CSG_Vector::Del_Row | ( | sLong | Row = -1 | ) |
Definition at line 201 of file mat_matrix.cpp.
References CSG_Array::Dec_Array(), Get_Data(), and Get_Size().
bool CSG_Vector::Del_Rows | ( | sLong | nRows | ) |
Deletes last nRows rows. Sets size to zero if nRows is greater than current number of rows Returns true if successful.
Definition at line 177 of file mat_matrix.cpp.
References Destroy(), Get_Size(), and CSG_Array::Set_Array().
Referenced by Set_Rows().
bool CSG_Vector::Destroy | ( | void | ) |
Definition at line 130 of file mat_matrix.cpp.
References CSG_Array::Set_Array().
Referenced by CSG_Trend_Polynom::Clr_Data(), CSG_Unique_Number_Statistics::Create(), CSG_Natural_Breaks::Create(), Create(), Del_Rows(), CSG_Cluster_Analysis::Destroy(), CSG_Spline::Destroy(), CSG_Thin_Plate_Spline::Destroy(), CSG_Regression::Destroy(), CSG_Regression_Weighted::Destroy(), CSG_KDTree::Destroy(), from_String(), CSG_Trend_Polynom::Set_Order(), and ~CSG_Vector().
|
inline |
Definition at line 447 of file mat_tools.h.
bool CSG_Vector::Flip_Values | ( | void | ) |
Definition at line 619 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by Sort().
bool CSG_Vector::from_String | ( | const CSG_String & | String | ) |
Definition at line 238 of file mat_matrix.cpp.
References Add_Row(), CSG_String::asDouble(), Destroy(), CSG_String_Tokenizer::Get_Next_Token(), Get_Size(), and CSG_String_Tokenizer::Has_More_Tokens().
double CSG_Vector::Get_Angle | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 703 of file mat_matrix.cpp.
References A, B, Get_Angle(), Get_Data(), Get_Length(), and Get_Size().
Referenced by Get_Angle().
CSG_Vector CSG_Vector::Get_Cross_Product | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 675 of file mat_matrix.cpp.
References Multiply_Cross().
|
inline |
|
inline |
Definition at line 384 of file mat_tools.h.
Referenced by CSG_Spline::_Create(), Add(), CSG_Matrix::Add_Col(), CSG_Matrix::Add_Row(), Add_Row(), Add_Rows(), Assign(), Create(), Del_Row(), Flip_Values(), Get_Angle(), Get_Length(), CSG_KDTree_2D::Get_Nearest_Points(), CSG_KDTree_3D::Get_Nearest_Points(), CSG_Formula::Get_Value(), CSG_Matrix::Ins_Col(), CSG_Matrix::Ins_Row(), is_Collinear(), is_Equal(), is_Null(), Multiply(), Multiply_Cross(), Multiply_Scalar(), CSG_Matrix::Set_Col(), CSG_Matrix::Set_Inverse(), CSG_Matrix::Set_Row(), Set_Unity(), SG_Matrix_Solve(), SG_VectorR3_Rotate(), Sort(), Subtract(), and to_String().
double CSG_Vector::Get_Length | ( | void | ) | const |
Definition at line 685 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by Get_Angle(), is_Collinear(), and Set_Unity().
|
inline |
Definition at line 382 of file mat_tools.h.
Referenced by CSG_Classifier_Supervised::Add_Class(), CSG_Regression_Weighted::Add_Sample(), CSG_Regression_Weighted::Calculate(), CSG_Histogram::Create(), CSG_Classifier_Supervised::Get_Class(), CSG_KDTree_2D::Get_Nearest_Points(), CSG_KDTree_3D::Get_Nearest_Points(), CSG_Regression_Multiple::Get_Residuals(), CSG_Trend_Polynom::Get_Trend(), CSG_Regression_Multiple::Get_Value(), CSG_Formula::Get_Value(), CSG_Trend_Polynom::Get_Value(), is_Collinear(), is_Equal(), is_Null(), CSG_Trend_Polynom::Set_Data(), CSG_Grid::Set_Row(), SG_Matrix_Solve(), SG_Matrix_Tridiagonal_QL(), and CSG_Classifier_Supervised::Train_Add_Sample().
|
inline |
Definition at line 379 of file mat_tools.h.
CSG_Vector CSG_Vector::Get_Scalar_Product | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 665 of file mat_matrix.cpp.
References Multiply_Scalar().
|
inline |
Definition at line 380 of file mat_tools.h.
Referenced by Add(), CSG_Matrix::Add_Col(), CSG_Matrix::Add_Row(), Add_Row(), Add_Rows(), Assign(), CSG_Regression_Weighted::Calculate(), CSG_Simple_Statistics::Create(), Del_Row(), Del_Rows(), Flip_Values(), from_String(), Get_Angle(), Get_Length(), CSG_Trend_Polynom::Get_Trend(), CSG_Thin_Plate_Spline::Get_Value(), CSG_Matrix::Ins_Col(), CSG_Matrix::Ins_Row(), is_Collinear(), is_Equal(), CSG_Matrix::Multiply(), Multiply(), Multiply_Cross(), Multiply_Scalar(), CSG_Matrix::Set_Col(), CSG_Matrix::Set_Row(), Set_Rows(), Set_Unity(), Set_Zero(), SG_VectorR2_Rotate(), SG_VectorR3_Rotate(), Sort(), Subtract(), and to_String().
CSG_Vector CSG_Vector::Get_Unity | ( | void | ) | const |
Definition at line 733 of file mat_matrix.cpp.
References Set_Unity().
|
inline |
Definition at line 381 of file mat_tools.h.
bool CSG_Vector::is_Collinear | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 296 of file mat_matrix.cpp.
References Get_Data(), Get_Length(), Get_N(), Get_Size(), and is_Null().
bool CSG_Vector::is_Equal | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 277 of file mat_matrix.cpp.
References Get_Data(), Get_N(), and Get_Size().
bool CSG_Vector::is_Null | ( | void | ) | const |
Definition at line 263 of file mat_matrix.cpp.
References Get_Data(), and Get_N().
Referenced by is_Collinear().
bool CSG_Vector::Multiply | ( | const class CSG_Matrix & | Matrix | ) |
Definition at line 449 of file mat_matrix.cpp.
References Assign(), and CSG_Matrix::Multiply().
bool CSG_Vector::Multiply | ( | const CSG_Vector & | Vector | ) |
Definition at line 410 of file mat_matrix.cpp.
References Multiply_Cross().
bool CSG_Vector::Multiply | ( | double | Scalar | ) |
Definition at line 394 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by operator*(), and operator*=().
bool CSG_Vector::Multiply_Cross | ( | const CSG_Vector & | Vector | ) |
Definition at line 416 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by Get_Cross_Product(), and Multiply().
double CSG_Vector::Multiply_Scalar | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 433 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by Get_Scalar_Product(), and operator*().
|
inline |
Definition at line 393 of file mat_tools.h.
|
inline |
Definition at line 414 of file mat_tools.h.
|
inline |
Definition at line 386 of file mat_tools.h.
double CSG_Vector::operator* | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 574 of file mat_matrix.cpp.
References Multiply_Scalar().
CSG_Vector CSG_Vector::operator* | ( | double | Scalar | ) | const |
Definition at line 565 of file mat_matrix.cpp.
References Multiply().
CSG_Vector & CSG_Vector::operator*= | ( | const class CSG_Matrix & | Matrix | ) |
Definition at line 519 of file mat_matrix.cpp.
References Multiply().
CSG_Vector & CSG_Vector::operator*= | ( | const CSG_Vector & | Vector | ) |
Definition at line 512 of file mat_matrix.cpp.
References Multiply().
CSG_Vector & CSG_Vector::operator*= | ( | double | Scalar | ) |
Definition at line 505 of file mat_matrix.cpp.
References Multiply().
CSG_Vector CSG_Vector::operator+ | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 536 of file mat_matrix.cpp.
References Add().
CSG_Vector CSG_Vector::operator+ | ( | double | Scalar | ) | const |
Definition at line 527 of file mat_matrix.cpp.
References Add().
CSG_Vector & CSG_Vector::operator+= | ( | const CSG_Vector & | Vector | ) |
Definition at line 482 of file mat_matrix.cpp.
References Add().
CSG_Vector & CSG_Vector::operator+= | ( | double | Scalar | ) |
Definition at line 475 of file mat_matrix.cpp.
References Add().
CSG_Vector CSG_Vector::operator- | ( | const CSG_Vector & | Vector | ) | const |
Definition at line 555 of file mat_matrix.cpp.
References Subtract().
CSG_Vector CSG_Vector::operator- | ( | double | Scalar | ) | const |
Definition at line 546 of file mat_matrix.cpp.
References Add().
CSG_Vector & CSG_Vector::operator-= | ( | const CSG_Vector & | Vector | ) |
Definition at line 497 of file mat_matrix.cpp.
References Subtract().
CSG_Vector & CSG_Vector::operator-= | ( | double | Scalar | ) |
Definition at line 490 of file mat_matrix.cpp.
References Add().
CSG_Vector & CSG_Vector::operator= | ( | const CSG_Vector & | Vector | ) |
Definition at line 467 of file mat_matrix.cpp.
References Assign().
CSG_Vector & CSG_Vector::operator= | ( | double | Scalar | ) |
Definition at line 460 of file mat_matrix.cpp.
References Assign().
|
inline |
Definition at line 413 of file mat_tools.h.
|
inline |
Definition at line 389 of file mat_tools.h.
|
inline |
Definition at line 392 of file mat_tools.h.
|
inline |
Definition at line 388 of file mat_tools.h.
|
inline |
Definition at line 391 of file mat_tools.h.
|
inline |
Definition at line 387 of file mat_tools.h.
|
inline |
Definition at line 390 of file mat_tools.h.
bool CSG_Vector::Set_Rows | ( | sLong | nRows | ) |
Sets the number of rows to nRows. Values will be preserved. Returns true if successful.
Definition at line 140 of file mat_matrix.cpp.
References Add_Rows(), Del_Rows(), and Get_Size().
Referenced by CSG_KDTree_2D::Get_Nearest_Points(), and CSG_KDTree_3D::Get_Nearest_Points().
bool CSG_Vector::Set_Unity | ( | void | ) |
Definition at line 596 of file mat_matrix.cpp.
References Get_Data(), Get_Length(), and Get_Size().
Referenced by Get_Unity().
bool CSG_Vector::Set_Zero | ( | void | ) |
Definition at line 590 of file mat_matrix.cpp.
References Create(), and Get_Size().
Referenced by CSG_Matrix::Set_Inverse().
bool CSG_Vector::Sort | ( | bool | bAscending = true | ) |
Definition at line 642 of file mat_matrix.cpp.
References Flip_Values(), Get_Data(), Get_Size(), and SG_Compare_Double().
Referenced by CSG_Natural_Breaks::Create().
bool CSG_Vector::Subtract | ( | const CSG_Vector & | Vector | ) |
Definition at line 378 of file mat_matrix.cpp.
References Get_Data(), and Get_Size().
Referenced by operator-(), and operator-=().
CSG_String CSG_Vector::to_String | ( | int | Width = -1 , |
int | Precision = -1 , |
||
bool | bScientific = false , |
||
const SG_Char * | Separator = NULL |
||
) | const |
Definition at line 225 of file mat_matrix.cpp.
References Get_Data(), Get_Size(), SG_Get_Double_asString(), and SG_T.