|
SNAP Library 2.3, Developer Reference
2014-06-16 11:58:46
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <mag.h>

Public Member Functions | |
| TMAGAffMtx () | |
| TMAGAffMtx (const int &Dim) | |
| TMAGAffMtx (const TFltV &SeedMatrix) | |
| TMAGAffMtx (const TMAGAffMtx &Kronecker) | |
| TMAGAffMtx & | operator= (const TMAGAffMtx &Kronecker) |
| bool | operator== (const TMAGAffMtx &Kronecker) const |
| int | GetPrimHashCd () const |
| int | GetSecHashCd () const |
| int | GetDim () const |
| int | Len () const |
| bool | Empty () const |
| bool | IsProbMtx () const |
| TFltV & | GetMtx () |
| const TFltV & | GetMtx () const |
| void | SetMtx (const TFltV &ParamV) |
| void | SetRndMtx (TRnd &Rnd, const int &PrmMtxDim=2, const double &MinProb=0.0) |
| void | PutAllMtx (const double &Val) |
| void | GenMtx (const int &Dim) |
| void | SetEpsMtx (const double &Eps1, const double &Eps0, const int &Eps1Val=1, const int &Eps0Val=0) |
| void | AddRndNoise (TRnd &Rnd, const double &SDev) |
| TStr | GetMtxStr () const |
| const double & | At (const int &Row, const int &Col) const |
| double & | At (const int &Row, const int &Col) |
| const double & | At (const int &ValN) const |
| double & | At (const int &ValN) |
| double | GetMtxSum () const |
| double | GetRowSum (const int &RowId) const |
| double | GetColSum (const int &ColId) const |
| double | Normalize () |
| void | GetLLMtx (TMAGAffMtx &LLMtx) |
| void | GetProbMtx (TMAGAffMtx &ProbMtx) |
| void | Swap (TMAGAffMtx &Mtx) |
| void | Dump (const TStr &MtxNm=TStr(), const bool &Sort=false) const |
Static Public Member Functions | |
| static double | GetAvgAbsErr (const TMAGAffMtx &Mtx1, const TMAGAffMtx &Mtx2) |
| static double | GetAvgFroErr (const TMAGAffMtx &Mtx1, const TMAGAffMtx &Mtx2) |
| static TMAGAffMtx | GetMtx (TStr MatlabMtxStr) |
| static TMAGAffMtx | GetRndMtx (TRnd &Rnd, const int &Dim=2, const double &MinProb=0.0) |
Private Attributes | |
| TInt | MtxDim |
| TFltV | SeedMtx |
Static Private Attributes | |
| static const double | NInf = -DBL_MAX |
| TMAGAffMtx::TMAGAffMtx | ( | const TFltV & | SeedMatrix | ) |
|
inline |
| void TMAGAffMtx::AddRndNoise | ( | TRnd & | Rnd, |
| const double & | SDev | ||
| ) |
Definition at line 52 of file mag.cpp.
References At(), Dump(), TRnd::GetNrmDev(), and Len().

|
inline |
Definition at line 41 of file mag.h.
References MtxDim, and SeedMtx.
Referenced by AddRndNoise(), TMAGFitBern::ComputeApxAdjLL(), TMAGFitBern::GetAvgInCoeff(), TMAGFitBern::GetAvgOutCoeff(), TMAGFitBern::GetAvgSqThetaLL(), TMAGFitBern::GetAvgThetaLL(), GetColSum(), TMAGFitBern::GetInCoeff(), GetLLMtx(), GetMtx(), GetMtxStr(), GetMtxSum(), TMAGFitBern::GetOutCoeff(), GetProbMtx(), GetRowSum(), TMAGFitBern::GetSqThetaLL(), TMAGFitBern::GetThetaLL(), TMAGFitBern::GradAffMtx(), TMAGFitBern::GradApxAffMtx(), IsProbMtx(), Normalize(), SetEpsMtx(), TMAGFitBern::UpdateAffMtx(), TMAGFitBern::UpdateApxPhiMI(), TMAGFitBern::UpdatePhi(), and TMAGFitBern::UpdatePhiMI().

|
inline |
|
inline |
|
inline |
Definition at line 128 of file mag.cpp.
References TStr::CStr(), TStr::Empty(), GetDim(), TVec< TVal, TSizeTy >::Len(), SeedMtx, and TVec< TVal, TSizeTy >::Sort().
Referenced by AddRndNoise().


|
inline |
Definition at line 28 of file mag.h.
References TVec< TVal, TSizeTy >::Empty(), and SeedMtx.

|
inline |
Definition at line 36 of file mag.h.
References TVec< TVal, TSizeTy >::Gen(), MtxDim, and SeedMtx.
Referenced by GetLLMtx(), and GetProbMtx().


|
static |
Definition at line 147 of file mag.cpp.
References GetMtx(), IAssert, TVec< TVal, TSizeTy >::Len(), and TVec< TVal, TSizeTy >::Sort().

|
static |
Definition at line 160 of file mag.cpp.
References GetMtx(), IAssert, TVec< TVal, TSizeTy >::Len(), and TVec< TVal, TSizeTy >::Sort().

| double TMAGAffMtx::GetColSum | ( | const int & | ColId | ) | const |
|
inline |
Definition at line 26 of file mag.h.
References MtxDim.
Referenced by Dump(), GetColSum(), GetMtxStr(), and GetRowSum().

| void TMAGAffMtx::GetLLMtx | ( | TMAGAffMtx & | LLMtx | ) |
Definition at line 74 of file mag.cpp.
References At(), GenMtx(), Len(), MtxDim, and NInf.
Referenced by TMAGFitBern::ComputeApxAdjLL(), TMAGFitBern::ComputeApxLL(), TMAGFitBern::UpdateApxPhiMI(), TMAGFitBern::UpdatePhi(), and TMAGFitBern::UpdatePhiMI().


|
inline |
Definition at line 31 of file mag.h.
References SeedMtx.
Referenced by GetAvgAbsErr(), GetAvgFroErr(), and TMAGParam< TNodeAttr >::LoadTxt().

|
inline |
|
static |
Definition at line 173 of file mag.cpp.
References At(), TStr::ChangeChAll(), TVec< TVal, TSizeTy >::Empty(), IAssert, TVec< TVal, TSizeTy >::Len(), and TStr::SplitOnAllCh().

| TStr TMAGAffMtx::GetMtxStr | ( | ) | const |
Definition at line 63 of file mag.cpp.
References At(), TStr::Fmt(), GetDim(), and Len().
Referenced by TMAGFitBern::UpdateAffMtx().


| double TMAGAffMtx::GetMtxSum | ( | ) | const |
Definition at line 95 of file mag.cpp.
Referenced by Normalize().


|
inline |
Definition at line 22 of file mag.h.
References TVec< TVal, TSizeTy >::GetPrimHashCd(), and SeedMtx.

| void TMAGAffMtx::GetProbMtx | ( | TMAGAffMtx & | ProbMtx | ) |
|
static |
Definition at line 191 of file mag.cpp.
References SetRndMtx().

| double TMAGAffMtx::GetRowSum | ( | const int & | RowId | ) | const |
|
inline |
Definition at line 23 of file mag.h.
References TVec< TVal, TSizeTy >::GetSecHashCd(), and SeedMtx.

| bool TMAGAffMtx::IsProbMtx | ( | ) | const |
|
inline |
Definition at line 27 of file mag.h.
References TVec< TVal, TSizeTy >::Len(), and SeedMtx.
Referenced by AddRndNoise(), GetLLMtx(), GetMtxStr(), GetMtxSum(), GetProbMtx(), IsProbMtx(), Normalize(), SetEpsMtx(), TMAGFitBern::UpdateApxPhiMI(), TMAGFitBern::UpdatePhi(), and TMAGFitBern::UpdatePhiMI().


| double TMAGAffMtx::Normalize | ( | ) |
Definition at line 116 of file mag.cpp.
References At(), GetMtxSum(), and Len().

| TMAGAffMtx & TMAGAffMtx::operator= | ( | const TMAGAffMtx & | Kronecker | ) |
|
inline |
|
inline |
Definition at line 35 of file mag.h.
References TVec< TVal, TSizeTy >::PutAll(), and SeedMtx.

| void TMAGAffMtx::SetEpsMtx | ( | const double & | Eps1, |
| const double & | Eps0, | ||
| const int & | Eps1Val = 1, |
||
| const int & | Eps0Val = 0 |
||
| ) |
|
inline |
| void TMAGAffMtx::SetRndMtx | ( | TRnd & | Rnd, |
| const int & | PrmMtxDim = 2, |
||
| const double & | MinProb = 0.0 |
||
| ) |
Definition at line 34 of file mag.cpp.
References TVec< TVal, TSizeTy >::Gen(), TRnd::GetUniDev(), TVec< TVal, TSizeTy >::Len(), MtxDim, and SeedMtx.
Referenced by GetRndMtx().


| void TMAGAffMtx::Swap | ( | TMAGAffMtx & | Mtx | ) |
|
private |
Definition at line 13 of file mag.h.
Referenced by At(), GenMtx(), GetDim(), GetLLMtx(), GetProbMtx(), operator=(), SetRndMtx(), Swap(), and TMAGAffMtx().
|
staticprivate |
Definition at line 11 of file mag.h.
Referenced by GetLLMtx(), and GetProbMtx().
|
private |
Definition at line 14 of file mag.h.
Referenced by At(), Dump(), Empty(), GenMtx(), GetMtx(), GetPrimHashCd(), GetSecHashCd(), Len(), operator=(), operator==(), PutAllMtx(), SetMtx(), SetRndMtx(), Swap(), and TMAGAffMtx().