SNAP Library 6.0, Developer Reference
2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <linalg.h>
Public Types | |
enum | TLinAlgGemmTranspose { GEMM_NO_T = 0, GEMM_A_T = 1, GEMM_B_T = 2, GEMM_C_T = 4 } |
enum | TLinAlgInverseType { DECOMP_SVD } |
Static Public Member Functions | |
static double | DotProduct (const TFltV &x, const TFltV &y) |
static double | DotProduct (const TFltVV &X, int ColIdX, const TFltVV &Y, int ColIdY) |
static double | DotProduct (const TFltVV &X, int ColId, const TFltV &Vec) |
static double | DotProduct (const TIntFltKdV &x, const TIntFltKdV &y) |
static double | DotProduct (const TFltV &x, const TIntFltKdV &y) |
static double | DotProduct (const TFltVV &X, int ColId, const TIntFltKdV &y) |
static void | LinComb (const double &p, const TFltV &x, const double &q, const TFltV &y, TFltV &z) |
static void | ConvexComb (const double &p, const TFltV &x, const TFltV &y, TFltV &z) |
static void | AddVec (const double &k, const TFltV &x, const TFltV &y, TFltV &z) |
static void | AddVec (const double &k, const TIntFltKdV &x, const TFltV &y, TFltV &z) |
static void | AddVec (const double &k, const TIntFltKdV &x, TFltV &y) |
static void | AddVec (double k, const TFltVV &X, int ColIdX, TFltVV &Y, int ColIdY) |
static void | AddVec (double k, const TFltVV &X, int ColId, TFltV &Result) |
static void | AddVec (const TIntFltKdV &x, const TIntFltKdV &y, TIntFltKdV &z) |
static double | SumVec (const TFltV &x) |
static double | SumVec (double k, const TFltV &x, const TFltV &y) |
static double | EuclDist2 (const TFltV &x, const TFltV &y) |
static double | EuclDist2 (const TFltPr &x, const TFltPr &y) |
static double | EuclDist (const TFltV &x, const TFltV &y) |
static double | EuclDist (const TFltPr &x, const TFltPr &y) |
static double | Norm2 (const TFltV &x) |
static double | Norm (const TFltV &x) |
static void | Normalize (TFltV &x) |
static double | Norm2 (const TIntFltKdV &x) |
static double | Norm (const TIntFltKdV &x) |
static void | Normalize (TIntFltKdV &x) |
static double | Norm2 (const TFltVV &X, int ColId) |
static double | Norm (const TFltVV &X, int ColId) |
static double | NormL1 (const TFltV &x) |
static double | NormL1 (double k, const TFltV &x, const TFltV &y) |
static double | NormL1 (const TIntFltKdV &x) |
static void | NormalizeL1 (TFltV &x) |
static void | NormalizeL1 (TIntFltKdV &x) |
static double | NormLinf (const TFltV &x) |
static double | NormLinf (const TIntFltKdV &x) |
static void | NormalizeLinf (TFltV &x) |
static void | NormalizeLinf (TIntFltKdV &x) |
static void | MultiplyScalar (const double &k, const TFltV &x, TFltV &y) |
static void | MultiplyScalar (const double &k, const TIntFltKdV &x, TIntFltKdV &y) |
static void | Multiply (const TFltVV &A, const TFltV &x, TFltV &y) |
static void | Multiply (const TFltVV &A, const TFltV &x, TFltVV &C, int ColId) |
static void | Multiply (const TFltVV &A, const TFltVV &B, int ColId, TFltV &y) |
static void | Multiply (const TFltVV &A, const TFltVV &B, int ColIdB, TFltVV &C, int ColIdC) |
static void | MultiplyT (const TFltVV &A, const TFltV &x, TFltV &y) |
static void | Multiply (const TFltVV &A, const TFltVV &B, TFltVV &C) |
static void | Gemm (const double &Alpha, const TFltVV &A, const TFltVV &B, const double &Beta, const TFltVV &C, TFltVV &D, const int &TransposeFlags) |
static void | Inverse (const TFltVV &A, TFltVV &B, const TLinAlgInverseType &DecompType) |
static void | InverseSVD (const TFltVV &A, TFltVV &B) |
static void | Transpose (const TFltVV &A, TFltVV &B) |
static void | GS (TVec< TFltV > &Q) |
static void | GS (TFltVV &Q) |
static void | Rotate (const double &OldX, const double &OldY, const double &Angle, double &NewX, double &NewY) |
static void | AssertOrtogonality (const TVec< TFltV > &Vecs, const double &Threshold) |
static void | AssertOrtogonality (const TFltVV &Vecs, const double &Threshold) |
Enumerator | |
---|---|
GEMM_NO_T | |
GEMM_A_T | |
GEMM_B_T | |
GEMM_C_T |
Definition at line 232 of file linalg.cpp.
References LinComb().
Referenced by GS(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TFullColMatrix::PMultiply(), and TSparseSVD::SimpleLanczos().
|
static |
Definition at line 236 of file linalg.cpp.
References Assert, and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 249 of file linalg.cpp.
References TVec< TVal, TSizeTy >::Len().
Definition at line 259 of file linalg.cpp.
References Assert, and TVVec< TVal, TSizeTy >::GetRows().
Definition at line 267 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetRows(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 275 of file linalg.cpp.
References TSparseOps< TKey, TDat >::SparseMerge().
Definition at line 616 of file linalg.cpp.
References TFlt::Abs(), DotProduct(), TVec< TVal, TSizeTy >::Len(), and Norm2().
|
static |
Definition at line 630 of file linalg.cpp.
References TFlt::Abs(), DotProduct(), TVVec< TVal, TSizeTy >::GetCols(), and Norm2().
Definition at line 227 of file linalg.cpp.
References AssertR, TFlt::GetStr(), and LinComb().
Definition at line 165 of file linalg.cpp.
References TStr::Fmt(), IAssertR, and TVec< TVal, TSizeTy >::Len().
Referenced by AssertOrtogonality(), TLogRegFit::GetStepSizeByLineSearch(), TAGMFit::GetStepSizeByLineSearchForLambda(), TCesna::GetStepSizeByLineSearchForWK(), GS(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TLogRegFit::MLENewton(), Norm2(), TFullColMatrix::PMultiplyT(), and TSparseSVD::SimpleLanczos().
Definition at line 173 of file linalg.cpp.
References Assert, and TVVec< TVal, TSizeTy >::GetRows().
Definition at line 181 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetRows(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 189 of file linalg.cpp.
References TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 200 of file linalg.cpp.
References TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 209 of file linalg.cpp.
References TVVec< TVal, TSizeTy >::GetRows(), and TVec< TVal, TSizeTy >::Len().
Definition at line 312 of file linalg.cpp.
References EuclDist2().
Definition at line 316 of file linalg.cpp.
References EuclDist2().
Definition at line 298 of file linalg.cpp.
References Assert, TVec< TVal, TSizeTy >::Len(), and TMath::Sqr().
Referenced by EuclDist().
Definition at line 308 of file linalg.cpp.
References TMath::Sqr(), TPair< TVal1, TVal2 >::Val1, and TPair< TVal1, TVal2 >::Val2.
|
static |
Definition at line 493 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::At(), GEMM_A_T, GEMM_B_T, GEMM_C_T, TVVec< TVal, TSizeTy >::GetCols(), and TVVec< TVal, TSizeTy >::GetRows().
Definition at line 584 of file linalg.cpp.
References AddVec(), DotProduct(), IAssert, TVec< TVal, TSizeTy >::Len(), and Normalize().
Referenced by TSparseSVD::OrtoIterSVD().
|
static |
Definition at line 598 of file linalg.cpp.
References AddVec(), DotProduct(), TVVec< TVal, TSizeTy >::GetCols(), TVVec< TVal, TSizeTy >::GetRows(), and Norm().
|
static |
Definition at line 548 of file linalg.cpp.
References DECOMP_SVD, and InverseSVD().
Definition at line 555 of file linalg.cpp.
References TVVec< TVal, TSizeTy >::At(), TVVec< TVal, TSizeTy >::Gen(), TVVec< TVal, TSizeTy >::GetCols(), TVVec< TVal, TSizeTy >::GetRows(), TVec< TVal, TSizeTy >::Len(), and TSvd::Svd().
Referenced by Inverse().
|
static |
Definition at line 218 of file linalg.cpp.
References Assert, and TVec< TVal, TSizeTy >::Len().
Referenced by AddVec(), and ConvexComb().
Definition at line 428 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetCols(), TVVec< TVal, TSizeTy >::GetRows(), and TVec< TVal, TSizeTy >::Len().
Referenced by CalcDescriptionLength(), CalcNonNegativeFactorization(), TSparseSVD::Lanczos(), and TSparseSVD::Lanczos2().
Definition at line 438 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetCols(), TVVec< TVal, TSizeTy >::GetRows(), and TVec< TVal, TSizeTy >::Len().
Definition at line 448 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetCols(), TVVec< TVal, TSizeTy >::GetRows(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 458 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetCols(), and TVVec< TVal, TSizeTy >::GetRows().
Definition at line 478 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetCols(), and TVVec< TVal, TSizeTy >::GetRows().
Definition at line 414 of file linalg.cpp.
References Assert, and TVec< TVal, TSizeTy >::Len().
Referenced by Normalize(), NormalizeL1(), NormalizeLinf(), and TSparseSVD::SimpleLanczos().
|
static |
Definition at line 421 of file linalg.cpp.
References Assert, and TVec< TVal, TSizeTy >::Len().
Definition at line 468 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::GetCols(), TVVec< TVal, TSizeTy >::GetRows(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 324 of file linalg.cpp.
References Norm2().
Referenced by GS(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TAGMFit::MLEGradAscentGivenCAG(), TLogRegFit::MLEGradient(), Normalize(), TSparseSVD::OrtoIterSVD(), and TSparseSVD::SimpleLanczos().
|
static |
Definition at line 341 of file linalg.cpp.
References Norm2().
|
static |
Definition at line 353 of file linalg.cpp.
References Norm2().
|
static |
Definition at line 320 of file linalg.cpp.
References DotProduct().
Referenced by AssertOrtogonality(), TCesna::MLEGradAscent(), TCesna::MLEGradAscentParallel(), and Norm().
|
static |
Definition at line 333 of file linalg.cpp.
References TVec< TVal, TSizeTy >::Len(), and TMath::Sqr().
|
static |
Definition at line 349 of file linalg.cpp.
References DotProduct().
|
static |
Definition at line 328 of file linalg.cpp.
References MultiplyScalar(), and Norm().
Referenced by GS(), and MotifCluster::NFiedlerVector().
|
static |
Definition at line 345 of file linalg.cpp.
References MultiplyScalar(), and Norm().
|
static |
Definition at line 380 of file linalg.cpp.
References MultiplyScalar(), and NormL1().
|
static |
Definition at line 385 of file linalg.cpp.
References MultiplyScalar(), and NormL1().
|
static |
Definition at line 404 of file linalg.cpp.
References MultiplyScalar(), and NormLinf().
|
static |
Definition at line 409 of file linalg.cpp.
References MultiplyScalar(), and NormLinf().
|
static |
Definition at line 357 of file linalg.cpp.
References TFlt::Abs(), and TVec< TVal, TSizeTy >::Len().
Referenced by NormalizeL1().
Definition at line 364 of file linalg.cpp.
References TFlt::Abs(), Assert, and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 373 of file linalg.cpp.
References TFlt::Abs(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 390 of file linalg.cpp.
References TFlt::Abs(), TFlt::GetMx(), and TVec< TVal, TSizeTy >::Len().
Referenced by NormalizeLinf().
|
static |
Definition at line 397 of file linalg.cpp.
References TFlt::Abs(), TFlt::GetMx(), and TVec< TVal, TSizeTy >::Len().
|
static |
Definition at line 611 of file linalg.cpp.
|
static |
Definition at line 279 of file linalg.cpp.
References TVec< TVal, TSizeTy >::Len().
Referenced by TAGMFit::Likelihood().
Definition at line 288 of file linalg.cpp.
References Assert, and TVec< TVal, TSizeTy >::Len().
Definition at line 539 of file linalg.cpp.
References Assert, TVVec< TVal, TSizeTy >::At(), TVVec< TVal, TSizeTy >::GetCols(), and TVVec< TVal, TSizeTy >::GetRows().