SNAP Library 2.1, Developer Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <ds.h>
Public Member Functions | |
TVVec () | |
TVVec (const TVVec &Vec) | |
TVVec (const int &_XDim, const int &_YDim) | |
TVVec (const TVec< TVal > &_ValV, const int &_XDim, const int &_YDim) | |
TVVec (TSIn &SIn) | |
void | Load (TSIn &SIn) |
void | Save (TSOut &SOut) const |
TVVec< TVal > & | operator= (const TVVec< TVal > &Vec) |
bool | operator== (const TVVec &Vec) const |
bool | Empty () const |
void | Clr () |
void | Gen (const int &_XDim, const int &_YDim) |
int | GetXDim () const |
int | GetYDim () const |
int | GetRows () const |
int | GetCols () const |
TVec< TVal > & | Get1DVec () |
const TVal & | At (const int &X, const int &Y) const |
TVal & | At (const int &X, const int &Y) |
TVal & | operator() (const int &X, const int &Y) |
const TVal & | operator() (const int &X, const int &Y) const |
void | PutXY (const int &X, const int &Y, const TVal &Val) |
void | PutAll (const TVal &Val) |
void | PutX (const int &X, const TVal &Val) |
void | PutY (const int &Y, const TVal &Val) |
TVal | GetXY (const int &X, const int &Y) const |
void | GetRow (const int &RowN, TVec< TVal > &Vec) const |
void | GetCol (const int &ColN, TVec< TVal > &Vec) const |
void | SwapX (const int &X1, const int &X2) |
void | SwapY (const int &Y1, const int &Y2) |
void | Swap (TVVec< TVal > &Vec) |
void | ShuffleX (TRnd &Rnd) |
void | ShuffleY (TRnd &Rnd) |
void | GetMxValXY (int &X, int &Y) const |
void | CopyFrom (const TVVec< TVal > &VVec) |
void | AddXDim () |
void | AddYDim () |
void | DelX (const int &X) |
void | DelY (const int &Y) |
Private Attributes | |
TInt | XDim |
TInt | YDim |
TVec< TVal > | ValV |
Definition at line 3213 of file ds.h.
References TVVec< TVal >::CopyFrom().
{ TVVec<TVal> NewVVec(XDim+1, YDim); NewVVec.CopyFrom(*this); *this=NewVVec; }
Definition at line 3220 of file ds.h.
References TVVec< TVal >::CopyFrom().
{ TVVec<TVal> NewVVec(XDim, YDim+1); NewVVec.CopyFrom(*this); *this=NewVVec; }
Definition at line 3125 of file ds.h.
Referenced by TMAGNodeSimple::AttrGen(), TMAGNodeBern::AttrGen(), TMAGNodeBeta::AttrGen(), TMAGFitBern::ComputeJointAdjLL(), TMAGFitBern::ComputeJointLL(), TMAGFitBern::ComputeJointOneLL(), TVVec< TVal >::CopyFrom(), TMom::DefVV(), TVVec< TVal >::DelX(), TVVec< TVal >::DelY(), TMAGFitBern::DoEMAlg(), TMAGFitBern::DoEStepApxOneIter(), TMAGFitBern::DoEStepOneIter(), TLinAlg::Gemm(), TMAGParam< TNodeAttr >::GenAttrMAG(), TMAGParam< TNodeAttr >::GenMAG(), TStr::GetDChStr(), TMAGFitBern::GetInCoeff(), TMAGFitBern::GetOutCoeff(), TMAGFitBern::GetProbMu(), TMAGFitBern::GetProbPhi(), TSnap::GetSngVals(), TSnap::GetSngVec(), TLinReg::GetXV(), TSvd::GetXV(), TLogRegFit::Hessian(), TLinAlg::InverseSVD(), TMom::IsUsableVV(), TMom::NewVV(), TLinReg::NR_covsrt(), TLinReg::NR_gaussj(), TLinReg::NR_lfit(), TSvd::NR_svbksb(), TSvd::NR_svdcmp(), TSvd::NR_svdfit(), TSvd::NR_svdvar(), TVVec< TFlt >::operator()(), TLAMisc::PrintTFltVV(), TVVec< TFlt >::PutX(), TVVec< TFlt >::PutXY(), TVVec< TFlt >::PutY(), TMAGFitBern::RandomInit(), TSvd::Svd(), TGraphKey::TakeSig(), TLinAlg::Transpose(), TMAGFitBern::UpdateApxPhiMI(), TMAGFitBern::UpdateMu(), TMAGFitBern::UpdatePhi(), and TMAGFitBern::UpdatePhiMI().
Definition at line 3115 of file ds.h.
Referenced by TMAGFitBern::Clr(), TMAGFitBern::ComputeJointLL(), TMAGFitBern::DoEStep(), TLAMisc::LoadMatlabTFltVV(), and TMAGFitBern::UpdateAffMtxV().
Definition at line 3202 of file ds.h.
References TVVec< TVal >::At(), TInt::GetMn(), TVVec< TVal >::GetXDim(), and TVVec< TVal >::GetYDim().
Referenced by TVVec< TVal >::AddXDim(), and TVVec< TVal >::AddYDim().
{ int CopyXDim=TInt::GetMn(GetXDim(), VVec.GetXDim()); int CopyYDim=TInt::GetMn(GetYDim(), VVec.GetYDim()); for (int X=0; X<CopyXDim; X++){ for (int Y=0; Y<CopyYDim; Y++){ At(X, Y)=VVec.At(X, Y); } } }
Definition at line 3227 of file ds.h.
References TVVec< TVal >::At().
Referenced by TSvd::Svd(), and TSvd::Svd1Based().
{ TVVec<TVal> NewVVec(XDim-1, YDim); for (int Y=0; Y<YDim; Y++){ for (int LX=0; LX<X; LX++){ NewVVec.At(LX, Y)=At(LX, Y);} for (int RX=X+1; RX<XDim; RX++){ NewVVec.At(RX-1, Y)=At(RX, Y);} } *this=NewVVec; }
Definition at line 3239 of file ds.h.
References TVVec< TVal >::At().
Referenced by TSvd::Svd(), and TSvd::Svd1Based().
{ TVVec<TVal> NewVVec(XDim, YDim-1); for (int X=0; X<XDim; X++){ for (int LY=0; LY<Y; LY++){ NewVVec.At(X, LY)=At(X, LY);} for (int RY=Y+1; RY<YDim; RY++){ NewVVec.At(X, RY-1)=At(X, RY);} } *this=NewVVec; }
Definition at line 3114 of file ds.h.
Referenced by TStr::GetDChStr().
Definition at line 3116 of file ds.h.
Referenced by TMAGNodeSimple::AttrGen(), TMAGNodeBern::AttrGen(), TMAGNodeBeta::AttrGen(), TMAGFitBern::DoEStepApxOneIter(), TStr::GetDChStr(), TLogRegFit::Hessian(), TMAGFitBern::Init(), TLinAlg::InverseSVD(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TSparseSVD::LanczosSVD(), TLAMisc::LoadMatlabTFltVV(), TMom::NewVV(), TSvd::NR_svdfit(), TMAGFitBern::PrepareUpdateAffMtx(), TMAGFitBern::PrepareUpdateApxAffMtx(), TMAGFitBern::RandomInit(), TMAGFitBern::SetPhiVV(), TSvd::Svd(), TSvd::Svd1Based(), TMAGFitBern::TMAGFitBern(), and TVVec< TFlt >::TVVec().
Definition at line 3259 of file ds.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().
Referenced by TSnap::GetEigVec(), TSnap::GetInvParticipRat(), and TSnap::GetSngVec().
Definition at line 3122 of file ds.h.
Referenced by TLinAlg::AssertOrtogonality(), TNumericalStuff::CholeskyDecomposition(), TNumericalStuff::CholeskySolve(), TLAMisc::FillIdentity(), TNIBs::find_min_state(), TLinAlg::Gemm(), TSnap::GetInvParticipRat(), TLinAlg::GS(), TNumericalStuff::InverseSubstitute(), TLinAlg::InverseSVD(), TNumericalStuff::InverseSymetric(), TNumericalStuff::InverseTriagonal(), TNumericalStuff::LUDecomposition(), TNumericalStuff::LUSolve(), TLinAlg::Multiply(), TLinAlg::MultiplyT(), TLAMisc::PrintTFltVV(), TSparseSVD::Project(), TLAMisc::SaveMatlabTFltVV(), TNumericalStuff::SolveSymetricSystem(), and TLinAlg::Transpose().
{return YDim;}
void TVVec< TVal >::GetMxValXY | ( | int & | X, |
int & | Y | ||
) | const |
Definition at line 3251 of file ds.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().
Referenced by TMAGFitBern::UpdateApxPhiMI().
Definition at line 3121 of file ds.h.
Referenced by TLinAlg::AddVec(), TNumericalStuff::CholeskyDecomposition(), TNumericalStuff::CholeskySolve(), TLinAlg::DotProduct(), TLAMisc::FillIdentity(), TNIBs::find_min_state(), TLinAlg::Gemm(), TLinAlg::GS(), TNumericalStuff::InverseSubstitute(), TLinAlg::InverseSVD(), TNumericalStuff::InverseSymetric(), TNumericalStuff::InverseTriagonal(), TNumericalStuff::LUDecomposition(), TNumericalStuff::LUSolve(), TLinAlg::Multiply(), TLinAlg::MultiplyT(), TNGraphMtx::PMultiply(), TUNGraphMtx::PMultiply(), TSparseColMatrix::PMultiply(), TSparseRowMatrix::PMultiply(), TFullColMatrix::PMultiply(), TNGraphMtx::PMultiplyT(), TUNGraphMtx::PMultiplyT(), TSparseColMatrix::PMultiplyT(), TSparseRowMatrix::PMultiplyT(), TFullColMatrix::PMultiplyT(), TLAMisc::PrintTFltVV(), TLAMisc::SaveMatlabTFltVV(), TLAMisc::SaveMatlabTFltVVCol(), TNumericalStuff::SolveSymetricSystem(), and TLinAlg::Transpose().
{return XDim;}
Definition at line 3119 of file ds.h.
Referenced by TMAGFitBern::ComputeMI(), TVVec< TVal >::CopyFrom(), TMAGFitBern::CountAttr(), TMom::DefVV(), TLogRegFit::GetNewtonStep(), TMom::IsUsableVV(), TMAGFitBern::SetPhiVV(), TSvd::Svd(), and TSvd::Svd1Based().
{return XDim;}
Definition at line 3120 of file ds.h.
Referenced by TMAGFitBern::ComputeMI(), TVVec< TVal >::CopyFrom(), TMAGFitBern::CountAttr(), TMom::DefVV(), TMAGParam< TNodeAttr >::GenAttrMAG(), TMAGParam< TNodeAttr >::GenMAG(), TMAGFitBern::GradPhiMI(), TMom::IsUsableVV(), TMAGFitBern::ObjPhiMI(), TMAGFitBern::SetPhiVV(), TSvd::Svd(), and TSvd::Svd1Based().
{return YDim;}
TVal& TVVec< TVal >::operator() | ( | const int & | X, |
const int & | Y | ||
) | [inline] |
const TVal& TVVec< TVal >::operator() | ( | const int & | X, |
const int & | Y | ||
) | const [inline] |
Definition at line 3137 of file ds.h.
Referenced by TMAGNodeSimple::AttrGen(), TMAGNodeBern::AttrGen(), TMAGNodeBeta::AttrGen(), TMAGFitBern::ComputeMI(), TMAGFitBern::DoEStepApxOneIter(), TMAGFitBern::Init(), TMAGFitBern::RandomInit(), TMAGFitBern::SetPhiVV(), TMAGFitBern::UpdateApxPhiMI(), and TMAGFitBern::UpdatePhiMI().
Definition at line 3140 of file ds.h.
Referenced by TMAGFitBern::SetPhiVV().
Definition at line 3185 of file ds.h.
References TRnd::GetUniDevInt().
{ for (int X=0; X<XDim-1; X++){SwapX(X, X+Rnd.GetUniDevInt(XDim-X));} }
Definition at line 3190 of file ds.h.
References TRnd::GetUniDevInt().
{ for (int Y=0; Y<YDim-1; Y++){SwapY(Y, Y+Rnd.GetUniDevInt(YDim-Y));} }
Definition at line 3176 of file ds.h.
References Swap(), TVVec< TVal >::ValV, TVVec< TVal >::XDim, and TVVec< TVal >::YDim.
Definition at line 3095 of file ds.h.
Referenced by TVVec< TFlt >::At(), TVVec< TFlt >::Clr(), TVVec< TFlt >::Empty(), TVVec< TFlt >::Gen(), TVVec< TFlt >::Get1DVec(), TVVec< TFlt >::GetXY(), TVVec< TFlt >::Load(), TVVec< TFlt >::operator=(), TVVec< TFlt >::operator==(), TVVec< TFlt >::PutAll(), TVVec< TFlt >::Save(), TVVec< TVal >::Swap(), and TVVec< TFlt >::TVVec().
Definition at line 3094 of file ds.h.
Referenced by TVVec< TFlt >::At(), TVVec< TFlt >::Clr(), TVVec< TFlt >::Gen(), TVVec< TFlt >::GetRows(), TVVec< TFlt >::GetXDim(), TVVec< TFlt >::GetXY(), TVVec< TFlt >::Load(), TVVec< TFlt >::operator=(), TVVec< TFlt >::operator==(), TVVec< TFlt >::PutY(), TVVec< TFlt >::Save(), TVVec< TVal >::Swap(), and TVVec< TFlt >::TVVec().
Definition at line 3094 of file ds.h.
Referenced by TVVec< TFlt >::At(), TVVec< TFlt >::Clr(), TVVec< TFlt >::Gen(), TVVec< TFlt >::GetCols(), TVVec< TFlt >::GetXY(), TVVec< TFlt >::GetYDim(), TVVec< TFlt >::Load(), TVVec< TFlt >::operator=(), TVVec< TFlt >::operator==(), TVVec< TFlt >::PutX(), TVVec< TFlt >::Save(), TVVec< TVal >::Swap(), and TVVec< TFlt >::TVVec().