SNAP Library , Developer Reference  2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TVec< TVal > Class Template Reference

#include <ds.h>

Collaboration diagram for TVec< TVal >:

List of all members.

Public Types

typedef TVal * TIter

Public Member Functions

 TVec ()
 TVec (const TVec &Vec)
 TVec (const int &_Vals)
 TVec (const int &_MxVals, const int &_Vals)
 TVec (TVal *_ValT, const int &_Vals)
 ~TVec ()
 TVec (TSIn &SIn)
void Load (TSIn &SIn)
void Save (TSOut &SOut) const
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm="")
void SaveXml (TSOut &SOut, const TStr &Nm) const
TVec< TVal > & operator= (const TVec< TVal > &Vec)
TVec< TVal > & operator+ (const TVal &Val)
bool operator== (const TVec< TVal > &Vec) const
bool operator< (const TVec< TVal > &Vec) const
const TVal & operator[] (const int &ValN) const
TVal & operator[] (const int &ValN)
int GetMemUsed () const
int GetPrimHashCd () const
int GetSecHashCd () const
void Gen (const int &_Vals)
void Gen (const int &_MxVals, const int &_Vals)
void GenExt (TVal *_ValT, const int &_Vals)
bool IsExt () const
void Reserve (const int &_MxVals)
void Reserve (const int &_MxVals, const int &_Vals)
void Clr (const bool &DoDel=true, const int &NoDelLim=-1)
void Trunc (const int &_Vals=-1)
void Pack ()
void MoveFrom (TVec< TVal > &Vec)
void Swap (TVec< TVal > &Vec)
bool Empty () const
int Len () const
int Reserved () const
const TVal & Last () const
TVal & Last ()
int LastValN () const
const TVal & LastLast () const
TVal & LastLast ()
TIter BegI () const
TIter EndI () const
TIter GetI (const int &ValN) const
int Add ()
int Add (const TVal &Val)
int Add (const TVal &Val, const int &ResizeLen)
int AddV (const TVec< TVal > &ValV)
int AddSorted (const TVal &Val, const bool &Asc=true, const int &_MxVals=-1)
int AddBackSorted (const TVal &Val, const bool &Asc)
int AddMerged (const TVal &Val)
int AddVMerged (const TVec< TVal > &ValV)
int AddUnique (const TVal &Val)
const TVal & GetVal (const int &ValN) const
TVal & GetVal (const int &ValN)
void GetSubValV (const int &BValN, const int &EValN, TVec< TVal > &ValV) const
void Ins (const int &ValN, const TVal &Val)
void Del (const int &ValN)
void Del (const int &MnValN, const int &MxValN)
void DelLast ()
bool DelIfIn (const TVal &Val)
void DelAll (const TVal &Val)
void PutAll (const TVal &Val)
void Swap (const int &ValN1, const int &ValN2)
int GetPivotValN (const int &LValN, const int &RValN) const
void BSort (const int &MnLValN, const int &MxRValN, const bool &Asc)
void ISort (const int &MnLValN, const int &MxRValN, const bool &Asc)
int Partition (const int &MnLValN, const int &MxRValN, const bool &Asc)
void QSort (const int &MnLValN, const int &MxRValN, const bool &Asc)
void Sort (const bool &Asc=true)
bool IsSorted (const bool &Asc=true) const
void Shuffle (TRnd &Rnd)
void Reverse ()
void Reverse (int First, int Last)
void Merge ()
bool NextPerm ()
bool PrevPerm ()
void MakeHeap ()
void PushHeap (const TVal &Val)
const TVal & TopHeap () const
TVal PopHeap ()
template<class TCmp >
void MakeHeap (const TCmp &Cmp)
template<class TCmp >
void PushHeap (const TVal &Val, const TCmp &Cmp)
template<class TCmp >
TVal PopHeap (const TCmp &Cmp)
template<class TCmp >
void PushHeap (const int &First, int HoleIdx, const int &Top, TVal Val, const TCmp &Cmp)
template<class TCmp >
void AdjustHeap (const int &First, int HoleIdx, const int &Len, TVal Val, const TCmp &Cmp)
template<class TCmp >
void MakeHeap (const int &First, const int &Len, const TCmp &Cmp)
template<class TCmp >
void SortCmp (const TCmp &Cmp)
template<class TCmp >
bool IsSortedCmp (const TCmp &Cmp) const
void Intrs (const TVec< TVal > &ValV)
void Union (const TVec< TVal > &ValV)
void Diff (const TVec< TVal > &ValV)
void Minus (const TVec< TVal > &ValV)
void Intrs (const TVec< TVal > &ValV, TVec< TVal > &DstValV) const
void Union (const TVec< TVal > &ValV, TVec< TVal > &DstValV) const
void Diff (const TVec< TVal > &ValV, TVec< TVal > &DstValV) const
int IntrsLen (const TVec< TVal > &ValV) const
 Get the size of the intersection (number of common elements) of two vectors. Method assumes both vectors are sorted in ascending order!
void Minus (const TVec< TVal > &ValV, TVec< TVal > &DstValV) const
int Count (const TVal &Val) const
int SearchBin (const TVal &Val) const
int SearchBin (const TVal &Val, int &InsValN) const
int SearchForw (const TVal &Val, const int &BValN=0) const
int SearchBack (const TVal &Val) const
int SearchVForw (const TVec< TVal > &ValV, const int &BValN=0) const
bool IsIn (const TVal &Val) const
bool IsIn (const TVal &Val, int &ValN) const
bool IsInBin (const TVal &Val) const
int GetMxValN () const
TVal & GetDat (const TVal &Val) const
TVal & GetAddDat (const TVal &Val)

Static Public Member Functions

static void SwapI (TIter LVal, TIter RVal)
template<class TCmp >
static TIter GetPivotValNCmp (const TIter &BI, const TIter &EI, const TCmp &Cmp)
template<class TCmp >
static TIter PartitionCmp (TIter BI, TIter EI, const TVal Pivot, const TCmp &Cmp)
template<class TCmp >
static void BSortCmp (TIter BI, TIter EI, const TCmp &Cmp)
template<class TCmp >
static void ISortCmp (TIter BI, TIter EI, const TCmp &Cmp)
template<class TCmp >
static void QSortCmp (TIter BI, TIter EI, const TCmp &Cmp)
static TVec< TVal > GetV (const TVal &Val1)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5, const TVal &Val6)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5, const TVal &Val6, const TVal &Val7)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5, const TVal &Val6, const TVal &Val7, const TVal &Val8)
static TVec< TVal > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5, const TVal &Val6, const TVal &Val7, const TVal &Val8, const TVal &Val9)

Protected Member Functions

void Resize (const int &_MxVals=-1)
TStr GetXOutOfBoundsErrMsg (const int &ValN) const

Protected Attributes

int MxVals
int Vals
TVal * ValT

Detailed Description

template<class TVal>
class TVec< TVal >

Definition at line 399 of file ds.h.


Member Typedef Documentation

template<class TVal>
typedef TVal* TVec< TVal >::TIter

Definition at line 401 of file ds.h.


Constructor & Destructor Documentation

template<class TVal>
TVec< TVal >::TVec ( ) [inline]

Definition at line 409 of file ds.h.

: MxVals(0), Vals(0), ValT(NULL){}
template<class TVal >
TVec< TVal >::TVec ( const TVec< TVal > &  Vec)

Definition at line 742 of file ds.h.

References TVec< TVal >::MxVals, TVec< TVal >::Vals, and TVec< TVal >::ValT.

                                     {
  MxVals=Vec.MxVals; Vals=Vec.Vals;
  if (MxVals==0){ValT=NULL;} else {ValT=new TVal[MxVals];}
  for (int ValN=0; ValN<Vec.Vals; ValN++){ValT[ValN]=Vec.ValT[ValN];}
}
template<class TVal>
TVec< TVal >::TVec ( const int &  _Vals) [inline, explicit]

Definition at line 411 of file ds.h.

                                 {
    IAssert(0<=_Vals); MxVals=Vals=_Vals;
    if (_Vals==0){ValT=NULL;} else {ValT=new TVal[_Vals];}}
template<class TVal>
TVec< TVal >::TVec ( const int &  _MxVals,
const int &  _Vals 
) [inline]

Definition at line 414 of file ds.h.

                                            {
    IAssert((0<=_Vals)&&(_Vals<=_MxVals)); MxVals=_MxVals; Vals=_Vals;
    if (_MxVals==0){ValT=NULL;} else {ValT=new TVal[_MxVals];}}
template<class TVal>
TVec< TVal >::TVec ( TVal *  _ValT,
const int &  _Vals 
) [inline, explicit]

Definition at line 417 of file ds.h.

                                              :
    MxVals(-1), Vals(_Vals), ValT(_ValT){}
template<class TVal>
TVec< TVal >::~TVec ( ) [inline]

Definition at line 419 of file ds.h.

{if ((ValT!=NULL) && (MxVals!=-1)){delete[] ValT;}}
template<class TVal>
TVec< TVal >::TVec ( TSIn SIn) [inline, explicit]

Definition at line 420 of file ds.h.

: MxVals(0), Vals(0), ValT(NULL){Load(SIn);}

Member Function Documentation

template<class TVal>
int TVec< TVal >::Add ( ) [inline]

Definition at line 481 of file ds.h.

Referenced by TCnCom::Add(), TGStatVec::Add(), TVecElt< TVec< TDat > >::Add(), TUniTrie< TInt >::Add(), TXmlLx::AddArg(), TNetInfBs::AddCasc(), TPp::AddCcVal(), TGnuPlot::AddCmd(), TWChA::AddCStr(), TLocClustStat::AddCut(), TUniChDb::AddDecomposition(), TSimpleGraph::AddEdge(), TGnuPlot::AddErrBar(), TGnuPlot::AddExpFit(), THttpResp::AddFldVal(), TGnuPlot::AddFunc(), THttpResp::AddHdFld(), TGnuPlot::AddLinFit(), TGnuPlot::AddLogFit(), TTree< TVal >::AddNode(), TUndirFFire::AddNodes(), TGnuPlot::AddPlot(), TPp::AddPp(), TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TSnap::AddSelfEdges(), TBigStrPool::AddStr(), TVecPool< TVal >::AddV(), TUniCaseFolding::AppendVector(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TUndirFFire::BurnGeoFire(), TCliqueOverlap::CalculateOverlapMtx(), TKroneckerLL::ChainGelmapRubinPlot(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TUniChDb::Compose(), TGnuPlot::CreatePlotFile(), TUniCodec::DecodeUtf16FromBytes(), TUniCodec::DecodeUtf16FromWords(), TUniCodec::DecodeUtf8(), TGStatVec::DelAfter(), TGStatVec::DelBefore(), TSnap::DelDegKNodes(), TGStatVec::DelSmallNodes(), TFile::DelWc(), TSnap::DelZeroDegNodes(), TVec< TVal >::Diff(), TSnap::TSnapDetail::TDelSelfEdges< PGraph, IsMultiGraph >::Do(), TSnap::TSnapDetail::TDelSelfEdges< PGraph, true >::Do(), TMAGFitBern::DoEMAlg(), TUniCodec::EncodeUtf16ToBytes(), TUniCodec::EncodeUtf16ToWords(), TUniCodec::EncodeUtf8(), TUniCodec::EncodeUtf8Str(), TSpecFunc::EntropyFracDim(), TSubGraphsEnum::EnumSubGraphs(), TCliqueOverlap::Expand(), TSpecFunc::ExpFit(), TUniChDb::ExtractStarters(), TLocClust::FindBestCut(), TBiConVisitor::FinishNode(), TSccVisitor< PGraph, OnlyCount >::FinishNode(), TKronNoise::FlipEdgeNoise(), TUniCaseFolding::Fold(), TSubGraphsEnum::Gen2Graphs(), TAGM::GenAGM(), TBlobBs::GenBlockLenV(), TKronMtx::GenFastKronecker(), TFfGGen::GenFFGraphs(), TSnap::GenGeoPrefAttach(), TSnap::GenPrefAttach(), TSnap::GenRMat(), TSnap::GenRndDegK(), TSnap::GenRndPowerLaw(), TVec< THKeyDat >::GetAddDat(), TUnicode::GetAllCodecs(), TNetInfBs::GetBestEdge(), TSnap::GetBetweennessCentr(), TSnap::GetBfsEffDiam(), TExp::GetBiDescV(), TLocClustStat::GetBoltzmanCurveStat(), TNetInfBs::GetBound(), TUniChDb::GetCaseConverted(), TSnap::GetClustCf(), TVVec< TVal >::GetCol(), THttpResp::GetCookieKeyValDmPathQuV(), TCliqueOverlap::GetCPMCommunities(), TLocClustStat::GetCurveStat(), THash< TKey, TDat, THashFunc >::GetDatV(), TSparseHash< TKey, TDat, GroupSize >::GetDatV(), TStrHash< TDat, TStringPool, THashFunc >::GetDatV(), TSnap::GetDegCnt(), TSnap::GetDegSeqV(), TSecTm::GetDtTmFromStr(), TTimeNENet::GetEdgeBuckets(), TTimeNENet::GetEdgeTmBuckets(), TTimeNENet::GetEIdByTm(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TSnap::GetEigVec(), TFFile::GetFNmV(), TGraphAnf< PGraph >::GetGraphAnf(), TUrlLx::GetHPath(), TEnv::GetIfArgPrefixIntV(), TEnv::GetIfArgPrefixStrV(), TSnap::GetInDegCnt(), TSnap::GetInvParticipRat(), TGHash< TDat >::GetKeyIdByDat(), TGHash< TDat >::GetKeyIdByGSz(), THash< TKey, TDat, THashFunc >::GetKeyV(), TSparseHash< TKey, TDat, GroupSize >::GetKeyV(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyV(), TSparseSet< TKey, GroupSize >::GetKeyV(), THashSet< TKey, THashFunc >::GetKeyV(), TSnap::GetLen2Paths(), TBPGraph::GetLNIdV(), TILx::GetLnV(), TGraphEnumUtils::GetMinAndGraphIds(), TSnap::GetMxDegNId(), TSnap::GetMxInDegNId(), TSnap::GetMxOutDegNId(), TTimeNet::GetNIdByTm(), TTimeNENet::GetNIdByTm(), TBigNet< TNodeData, IsDir >::GetNIdV(), TNodeNet< TNodeData >::GetNIdV(), TUNGraph::GetNIdV(), TNGraph::GetNIdV(), TNodeEDatNet< TNodeData, TEdgeData >::GetNIdV(), TNEGraph::GetNIdV(), TBPGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TGraphAnf< PGraph >::GetNodeAnf(), TTimeNet::GetNodeBuckets(), TTimeNENet::GetNodeBuckets(), TTree< TVal >::GetNodeIdV(), TSnap::GetNodeInDegV(), TGHash< TDat >::GetNodeMap(), TAGM::GetNodeMembership(), TSnap::GetNodeOutDegV(), TSnap::GetNodesAtHop(), TSnap::GetNodeWcc(), TSnap::GetOutDegCnt(), TWebPg::GetOutDescUrlStrKdV(), TWebPg::GetOutUrlV(), TCliqueOverlap::GetOverlapCliques(), TGraphEnumUtils::GetPermutations(), TTimeNENet::GetPrefAttach(), TSnap::GetRndESubGraph(), TBreathFS< PGraph >::GetRndPath(), TBPGraph::GetRNIdV(), TVVec< TVal >::GetRow(), TUniChDb::GetSimpleCaseConverted(), TSnap::GetSngVec(), TStr::GetSpaceStr(), TMacro::GetSrcSubstStrV(), TStrHash< TDat, TStringPool, THashFunc >::GetStrIdV(), TVec< TVal >::GetSubValV(), THtmlLx::GetTag(), TXmlTok::GetTagTokV(), TXmlDoc::GetTagTokV(), TXmlTok::GetTagValV(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), THtmlLx::GetTokStrV(), TSnap::GetTreeSig(), TTimeNENet::GetTriadEdges(), TSnap::GetTriads(), TVec< THKeyDat >::GetV(), TGStatVec::GetValV(), TILx::GetVarBoolV(), TILx::GetVarFltV(), TILx::GetVarIntV(), TMacro::GetVarNmV(), TEnv::GetVarNmV(), TEnv::GetVarNmValV(), TILx::GetVarStrPrV(), TILx::GetVarStrV(), TILx::GetVarStrVV(), TSnap::GetWccs(), TUStr::GetWordUStrV(), TMAGFitBern::GradApxAffMtx(), TKroneckerLL::GradDescent(), TKroneckerLL::GradDescentConvergence(), TNetInfBs::GreedyOpt(), TLocClustStat::ImposeNCP(), TForestFire::InfectAll(), TForestFire::InfectRnd(), TSnap::TSnapDetail::TCNMQMatrix::Init(), TNetInfBs::Init(), TNIBs::Init(), TTmInfo::InitDayOfWeekNmV(), TTmInfo::InitMonthNmV(), TGHash< TDat >::InitPermutations(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TVec< TVal >::Intrs(), TStr::IsWcMatch(), TNIBs::LabelBurstAutomaton(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TTimeNet::LoadArxiv(), TKeyDatFl< TKey, TDat, THashFunc >::LoadDatV(), TSnap::LoadDyNetGraphV(), TInt::LoadFrugalIntV(), TKeyDatFl< TKey, TDat, THashFunc >::LoadKeyV(), TLAMisc::LoadMatlabTFltVV(), TTimeNet::LoadPatents(), TGnuPlot::LoadTs(), TPpVal::LoadTxt(), TMAGNodeBern::LoadTxt(), TMAGNodeBeta::LoadTxt(), TPp::LoadTxt(), TXmlDoc::LoadTxt(), TUniChDb::LoadTxt_ProcessDecomposition(), TExp::LoadTxtFact(), TSs::LoadTxtFldV(), TExpHelp::LoadXml(), TSpecFunc::LogFit(), TMAGFitBern::MakeCCDF(), TGUtil::MakeExpBins(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TSnap::MakeUnDir(), McMcGetAvgJ(), TWebPg::New(), TSsParser::Next(), TVec< THKeyDat >::operator+(), TWChA::operator+=(), TSparseSVD::OrtoIterSVD(), TUniChDb::TUcdFileReader::ParseCodePointList(), THttpResp::ParseHttpResp(), PlotAutoCorrelation(), TLocClustStat::PlotBestClustDens(), TNcpGraphsBase::PlotBestWhisker(), TLocClustStat::PlotBoltzmanCurve(), TTimeNet::PlotCCfOverTm(), TLocClust::PlotCutDistr(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TFfGGen::PlotFireSize(), TSnap::PlotInvParticipRat(), TTimeNet::PlotMissingPast(), TLocClustStat::PlotNCP(), TNcpGraphsBase::PlotNcpMin(), TLocClustStat::PlotNCPModul(), TLocClustStat::PlotNcpTop10(), TLocClust::PlotPhiDistr(), TNcpGraphsBase::PlotRewBestWhisker(), TNcpGraphsBase::PlotRewNcpMin(), TSnap::PlotShortPathDistr(), TGnuPlot::PlotValCntH(), TGnuPlot::PlotValMomH(), TGnuPlot::PlotValV(), TLocClust::PlotVolDistr(), TSpecFunc::PowerFit(), TSparseSVD::Project(), TVec< THKeyDat >::PushHeap(), THtmlLx::PutArg(), TMBlobBs::PutBlob(), TWChA::PutCStr(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TKronNoise::RemoveEdgeNoise(), TBigNet< TNodeData, IsDir >::Rewire(), TLocClustStat::Run(), TKroneckerLL::RunEStep(), TKroneckerLL::RunKronEM(), THtmlDoc::SaveHtmlToXml(), TNetInfBs::SaveObjInfo(), TMAGNodeSimple::SaveTxt(), TMAGNodeBern::SaveTxt(), TMAGNodeBeta::SaveTxt(), TLocClustStat::SaveTxtInfo(), TNcpGraphsBase::SaveTxtNcpMin(), TKroneckerLL::SetDegPerm(), TKroneckerLL::SetGraph(), TKroneckerLL::SetOrderPerm(), TKroneckerLL::SetRandomEdges(), TTimeNENet::SetRndEdgeTimes(), TKroneckerLL::SetRndPerm(), TQQueue< TInt >::Shuffle(), TSparseSVD::SimpleLanczos(), TTuple< TVal, NVals >::Sort(), TSparseOps< TKey, TDat >::SparseMerge(), TStrUtil::SplitLines(), TStr::SplitOnAllAnyCh(), TStr::SplitOnAllCh(), TStrUtil::SplitOnCh(), TStr::SplitOnNonAlNum(), TStr::SplitOnStr(), TStr::SplitOnWs(), TStrUtil::SplitSentences(), TStrUtil::SplitWords(), TLocClust::SupportSweep(), TGStat::TakeConnComp(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), TGStat::TakeSpectral(), TGStat::TakeTriadPart(), TBigStrPool::TBigStrPool(), TEnv::TEnv(), TGnuPlot::Test(), TSnap::TestAnf(), TKroneckerLL::TestBicCriterion(), TUniChDb::TestComposition(), TUniCodec::TestDecodeUtf16(), TUniCodec::TestDecodeUtf8(), TUniChDb::TestFindNextWordOrSentenceBoundary(), TKroneckerLL::TestGradDescent(), TKroneckerLL::TestSamplePerm(), TUniCodec::TestUtf16(), TUniCodec::TestUtf8(), TUniChDb::TestWbFindNonIgnored(), TExp::TExp(), TFFile::TFFile(), THtmlDoc::THtmlDoc(), THtmlHldV::THtmlHldV(), TTimeNENet::TimeGrowth(), TMBlobBs::TMBlobBs(), TNcpGraphsBase::TNcpGraphsBase(), TLAMisc::ToSpVec(), T8BitCodec< TEncoding_ISO8859_3 >::ToUnicode(), TPreproc::TPreproc(), TSparseRowMatrix::TSparseRowMatrix(), TVecPool< TVal >::TVecPool(), TVec< TVal >::Union(), TMAGFitBern::UpdateApxPhiMI(), TNIBs::UpdateDiff(), TMAGFitBern::UpdatePhi(), TMAGFitBern::UpdatePhiMI(), and TUniCodec::WordsToBytes().

           {
    Assert(MxVals!=-1); if (Vals==MxVals){Resize();} return Vals++;}

Here is the caller graph for this function:

template<class TVal>
int TVec< TVal >::Add ( const TVal &  Val) [inline]

Definition at line 483 of file ds.h.

                          {
    Assert(MxVals!=-1); if (Vals==MxVals){Resize();} ValT[Vals]=Val; return Vals++;}
template<class TVal>
int TVec< TVal >::Add ( const TVal &  Val,
const int &  ResizeLen 
) [inline]

Definition at line 485 of file ds.h.

                                                {
    Assert(MxVals!=-1); if (Vals==MxVals){Resize(MxVals+ResizeLen);} ValT[Vals]=Val; return Vals++;}
template<class TVal>
int TVec< TVal >::AddBackSorted ( const TVal &  Val,
const bool &  Asc 
)

Definition at line 904 of file ds.h.

References Assert.

                                                             {
  Assert(MxVals!=-1);
  Add();
  int ValN=Vals-2;
  while ((ValN>=0)&&((Asc&&(Val<ValT[ValN]))||(!Asc&&(Val>ValT[ValN])))){
    ValT[ValN+1]=ValT[ValN]; ValN--;}
  ValT[ValN+1]=Val;
  return ValN+1;
}
template<class TVal>
int TVec< TVal >::AddMerged ( const TVal &  Val)

Definition at line 915 of file ds.h.

References Assert.

                                        {
  Assert(MxVals!=-1);
  int ValN=SearchBin(Val);
  if (ValN==-1){return AddSorted(Val);}
  else {GetVal(ValN)=Val; return -1;}
}
template<class TVal>
int TVec< TVal >::AddSorted ( const TVal &  Val,
const bool &  Asc = true,
const int &  _MxVals = -1 
)

Definition at line 889 of file ds.h.

References Assert, and Swap().

Referenced by TUNGraph::AddEdge(), TNGraph::AddEdge(), TNEGraph::AddEdge(), and TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge().

                                                                             {
  Assert(MxVals!=-1);
  int ValN=Add(Val);
  if (Asc){
    while ((ValN>0)&&(ValT[ValN]<ValT[ValN-1])){
      Swap(ValN, ValN-1); ValN--;}
  } else {
    while ((ValN>0)&&(ValT[ValN]>ValT[ValN-1])){
      Swap(ValN, ValN-1); ValN--;}
  }
  if ((_MxVals!=-1)&&(Len()>_MxVals)){Del(_MxVals, Len()-1);}
  return ValN;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal>
int TVec< TVal >::AddUnique ( const TVal &  Val)

Definition at line 930 of file ds.h.

References Assert.

Referenced by THitInfo::AddKeyword(), TExpHelp::GetCatNmV(), and TExpHelp::GetObjHdNmV().

                                        {
  Assert(MxVals!=-1);
  int ValN=SearchForw(Val);
  if (ValN==-1){return Add(Val);}
  else {GetVal(ValN)=Val; return -1;}
}

Here is the caller graph for this function:

template<class TVal>
int TVec< TVal >::AddV ( const TVec< TVal > &  ValV)
template<class TVal>
int TVec< TVal >::AddVMerged ( const TVec< TVal > &  ValV)

Definition at line 923 of file ds.h.

References Assert, and TVec< TVal >::Vals.

                                                {
  Assert(MxVals!=-1);
  for (int ValN=0; ValN<ValV.Vals; ValN++){AddMerged(ValV[ValN]);}
  return Len();
}
template<class TVal>
template<class TCmp >
void TVec< TVal >::AdjustHeap ( const int &  First,
int  HoleIdx,
const int &  Len,
TVal  Val,
const TCmp Cmp 
) [inline]

Definition at line 544 of file ds.h.

Referenced by TVec< THKeyDat >::MakeHeap(), and TVec< THKeyDat >::PopHeap().

                                                                                            {
    const int Top = HoleIdx;
    int Right = 2*HoleIdx+2;
    while (Right < Len) {
      if (Cmp(ValT[First+Right], ValT[First+Right-1])) { Right--; }
      ValT[First+HoleIdx] = ValT[First+Right];
      HoleIdx = Right;  Right = 2*(Right+1); }
    if (Right == Len) {
      ValT[First+HoleIdx] = ValT[First+Right-1];
      HoleIdx = Right-1; }
    PushHeap(First, HoleIdx, Top, Val, Cmp);
  }

Here is the caller graph for this function:

template<class TVal >
void TVec< TVal >::BSort ( const int &  MnLValN,
const int &  MxRValN,
const bool &  Asc 
)

Definition at line 999 of file ds.h.

References Swap().

                                                         {
  for (int ValN1=MnLValN; ValN1<=MxRValN; ValN1++){
    for (int ValN2=MxRValN; ValN2>ValN1; ValN2--){
      if (Asc){
        if (ValT[ValN2]<ValT[ValN2-1]){Swap(ValN2, ValN2-1);}
      } else {
        if (ValT[ValN2]>ValT[ValN2-1]){Swap(ValN2, ValN2-1);}
      }
    }
  }
}

Here is the call graph for this function:

template<class TVal>
template<class TCmp >
static void TVec< TVal >::BSortCmp ( TIter  BI,
TIter  EI,
const TCmp Cmp 
) [inline, static]

Definition at line 598 of file ds.h.

                                                            {
    for (TIter i = BI; i != EI; ++i) {
      for (TIter j = EI-1; j != i; --j) {
        if (Cmp(*j, *(j-1))) SwapI(j, j-1); }
    }
  }
template<class TVal >
void TVec< TVal >::Clr ( const bool &  DoDel = true,
const int &  NoDelLim = -1 
)

Definition at line 816 of file ds.h.

References IAssert.

Referenced by TGnuPlot::AddPwrFit3(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TUndirFFire::BurnGeoFire(), TCliqueOverlap::CalculateOverlapMtx(), TUStr::Clr(), TWChA::Clr(), TCnCom::Clr(), TMAGParam< TMAGNodeBern >::Clr(), TGStatVec::Clr(), TLocClustStat::Clr(), TUniTrie< TInt >::Clr(), TUniChDb::Clr(), TVecPool< TInt >::Clr(), TTree< TVal >::Clr(), TXmlLx::ClrArgV(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TSnap::CommunityGirvanNewman(), TUniChDb::Compose(), TUniCodec::DecodeUtf16FromBytes(), TUniCodec::DecodeUtf16FromWords(), TUniCodec::DecodeUtf8(), TUniChDb::Decompose(), TUniChDb::DecomposeAndCompose(), TMom::Def(), THitInfo::DelKeywords(), TVec< TVal >::Diff(), TSpecFunc::EntropyFracDim(), TSubGraphsEnum::EnumSubGraphs(), TUniChDb::ExtractStarters(), TLocClust::FindBestCut(), TBlobBs::GenBlockLenV(), TSnap::GenGeoPrefAttach(), TSnap::Get1CnCom(), TSnap::Get1CnComSzCnt(), TUnicode::GetAllCodecs(), TExp::GetBiDescV(), TUniChDb::GetCaseConverted(), TExpHelp::GetCatNmV(), TSnap::GetCmnNbrs(), THttpResp::GetCookieKeyValDmPathQuV(), TCliqueOverlap::GetCPMCommunities(), TLocClustStat::GetCurveStat(), THttpResp::GetFldValV(), TFFile::GetFNmV(), TGraphAnf< PGraph >::GetGraphAnf(), TSnap::GetInvParticipRat(), THashSet< TKey, THashFunc >::GetKeyV(), TSnap::GetLen2Paths(), TILx::GetLnV(), TCliqueOverlap::GetMaxCliques(), TCliqueOverlap::GetMaximalCliques(), TSnap::GetMxDegNId(), TSnap::GetMxInDegNId(), TSnap::GetMxOutDegNId(), TUniChDb::TUcdFileReader::GetNextLine(), TGraphAnf< PGraph >::GetNodeAnf(), TTree< TVal >::GetNodeIdV(), TGHash< TDat >::GetNodeMap(), TSnap::GetNodesAtHop(), TExpHelp::GetObjHdNmV(), TWebPg::GetOutDescUrlStrKdV(), TWebPg::GetOutUrlV(), TBreathFS< PGraph >::GetRndPath(), TUniChDb::GetSimpleCaseConverted(), TSnap::GetSngVec(), THtmlLx::GetSym(), TXmlTok::GetTagTokV(), TXmlDoc::GetTagTokV(), THtmlLx::GetTokStrV(), TTimeNENet::GetTriadEdges(), TSnap::GetTriads(), TVecPool< TInt >::GetV(), TILx::GetVarBoolV(), TILx::GetVarFltV(), TILx::GetVarIntV(), TEnv::GetVarNmV(), TEnv::GetVarNmValV(), TILx::GetVarStrPrV(), TILx::GetVarStrV(), TILx::GetVarStrVV(), TSnap::GetWccs(), TUStr::GetWordUStrV(), TKroneckerLL::GradDescentConvergence(), TNetInfBs::Init(), TNIBs::Init(), TVec< TVal >::Intrs(), TInt::LoadFrugalIntV(), TLAMisc::LoadMatlabTFltVV(), TGnuPlot::LoadTs(), TXmlDoc::LoadTxt(), TSs::LoadTxtFldV(), TGUtil::MakeExpBins(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TSsParser::Next(), TUniChDb::TUcdFileReader::ParseCodePointList(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TKroneckerLL::RestoreGraph(), TLocClustStat::Run(), TSparseOps< TKey, TDat >::SparseMerge(), TStrUtil::SplitLines(), TStr::SplitOnAllAnyCh(), TStr::SplitOnAllCh(), TStrUtil::SplitOnCh(), TStr::SplitOnNonAlNum(), TStr::SplitOnStr(), TStr::SplitOnWs(), TStrUtil::SplitSentences(), TStrUtil::SplitWords(), TLocClust::SupportSweep(), TUniCodec::TestUtf16(), TUniCodec::TestUtf8(), THtmlHldV::THtmlHldV(), TTimeNENet::TimeGrowth(), TLAMisc::ToSpVec(), T8BitCodec< TEncoding_ISO8859_3 >::ToUnicode(), and TUniCodec::WordsToBytes().

                                                          {
  if ((DoDel)||((!DoDel)&&(NoDelLim!=-1)&&(MxVals>NoDelLim))){
    if ((ValT!=NULL)&&(MxVals!=-1)){delete[] ValT;}
    MxVals=Vals=0; ValT=NULL;
  } else {
    IAssert(MxVals!=-1); Vals=0;
  }
}

Here is the caller graph for this function:

template<class TVal>
int TVec< TVal >::Count ( const TVal &  Val) const

Definition at line 1293 of file ds.h.

                                           {
  int Count = 0;
  for (int i = 0; i < Len(); i++){
    if (Val == ValT[i]){Count++;}}
  return Count;
}
template<class TVal >
void TVec< TVal >::Del ( const int &  MnValN,
const int &  MxValN 
)

Definition at line 966 of file ds.h.

References Assert.

                                                        {
  Assert(MxVals!=-1);
  Assert((0<=MnValN)&&(MnValN<Vals)&&(0<=MxValN)&&(MxValN<Vals));
  Assert(MnValN<=MxValN);
  for (int ValN=MxValN+1; ValN<Vals; ValN++){
    ValT[MnValN+ValN-MxValN-1]=ValT[ValN];}
  for (int ValN=Vals-MxValN+MnValN-1; ValN<Vals; ValN++){
    ValT[ValN]=TVal();}
  Vals-=MxValN-MnValN+1;
}
template<class TVal>
void TVec< TVal >::DelAll ( const TVal &  Val)

Definition at line 986 of file ds.h.

References Assert.

                                      {
  Assert(MxVals!=-1);
  int ValN;
  while ((ValN=SearchForw(Val))!=-1){
    Del(ValN);}
}
template<class TVal>
bool TVec< TVal >::DelIfIn ( const TVal &  Val)

Definition at line 978 of file ds.h.

References Assert.

Referenced by TNEGraph::DelEdge(), and TNodeEdgeNet< TNodeData, TEdgeData >::DelEdge().

                                       {
  Assert(MxVals!=-1);
  int ValN=SearchForw(Val);
  if (ValN!=-1){Del(ValN); return true;}
  else {return false;}
}

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::DelLast ( ) [inline]
template<class TVal>
void TVec< TVal >::Diff ( const TVec< TVal > &  ValV)

Definition at line 1182 of file ds.h.

                                           {
  TVec<TVal> DiffVec;
  Diff(ValV, DiffVec);
  MoveFrom(DiffVec);
}
template<class TVal>
void TVec< TVal >::Diff ( const TVec< TVal > &  ValV,
TVec< TVal > &  DstValV 
) const

Definition at line 1258 of file ds.h.

References TVec< TVal >::Add(), TVec< TVal >::Clr(), TVec< TVal >::GetVal(), and TVec< TVal >::Len().

                                                                       {
  DstValV.Clr();
  int ValN1=0; int ValN2=0;
  while (ValN1<Len() && ValN2<ValV.Len()) {
    const TVal& Val1 = GetVal(ValN1);
    while (ValN2<ValV.Len() && Val1>ValV.GetVal(ValN2)) ValN2++;
    if (ValN2<ValV.Len()) {
      if (Val1!=ValV.GetVal(ValN2)) { DstValV.Add(Val1); }
      ValN1++;
    }
  }
  for (int RestValN1=ValN1; RestValN1<Len(); RestValN1++){
    DstValV.Add(GetVal(RestValN1));}
}

Here is the call graph for this function:

template<class TVal>
bool TVec< TVal >::Empty ( ) const [inline]

Definition at line 464 of file ds.h.

Referenced by TGnuPlot::AddErrBar(), TGnuPlot::AddExpFit(), TGnuPlot::AddLinFit(), TGnuPlot::AddLogFit(), TGnuPlot::AddPlot(), TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TGStat::AvgGStat(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TUndirFFire::BurnGeoFire(), TGnuPlot::CreatePlotFile(), TMAGAffMtx::Empty(), TKronMtx::Empty(), TUStr::Empty(), TWChA::Empty(), TCnCom::Empty(), TGStatVec::Empty(), TLocClustStat::FindBestCut(), TSnap::TSnapDetail::TCNMQMatrix::FindMxQEdge(), TSnap::Get1CnCom(), TSnap::Get1CnComSzCnt(), TStr::GetChStr(), TSnap::GetClustCf(), TLocClustStat::TCutInfo::GetFracDegOut(), TEnv::GetIfArgPrefixStrV(), TSnap::GetInvParticipRat(), TMAGAffMtx::GetMtx(), TKronMtx::GetMtx(), TSnap::GetMxBiCon(), TSnap::GetMxDegNId(), TSnap::GetMxInDegNId(), TSnap::GetMxOutDegNId(), TSnap::GetMxScc(), TSnap::GetMxWcc(), TBreathFS< PGraph >::GetRndPath(), TStr::GetStr(), TUStr::GetWordUStrV(), TLocClustStat::ImposeNCP(), TBigNet< TNodeData, IsDir >::IsIsoNode(), TBigNet< TNodeData, IsDir >::IsOk(), TLAMisc::LoadMatlabTFltVV(), TSs::LoadTxt(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TLinReg::New(), TSvd::New(), TSsParser::Next(), TNcpGraphsBase::PlotBestWhisker(), TTimeNet::PlotEffDiam(), TSnap::PlotEigValDistr(), PlotGrad(), TSnap::PlotInvParticipRat(), TTimeNet::PlotMissingPast(), TLocClustStat::PlotNCP(), TNcpGraphsBase::PlotNcpMin(), TLocClustStat::PlotNCPModul(), TNcpGraphsBase::PlotRewBestWhisker(), TNcpGraphsBase::PlotRewNcpMin(), TSnap::PlotSngValDistr(), PlotTrueAndEst(), TGnuPlot::PlotValMomH(), TVec< THKeyDat >::PopHeap(), TGraphKey::SaveGViz(), TNcpGraphsBase::SaveTxtNcpMin(), TStrUtil::SplitOnCh(), and TStrUtil::SplitWords().

{return Vals==0;}

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Gen ( const int &  _Vals) [inline]

Definition at line 442 of file ds.h.

Referenced by TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TCliqueOverlap::CalculateOverlapMtx(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TMAGFitBern::CountAttr(), TMom::Def(), TMAGFitBern::DoEMAlg(), TMAGFitBern::DoEStepApxOneIter(), TMAGFitBern::DoEStepOneIter(), TMAGFitBern::DoMStep(), TSpecFunc::EntropyFracDim(), TSubGraphsEnum::EnumSubGraphs(), TUniChDb::FindSentenceBoundaries(), TUniChDb::FindWordBoundaries(), TKronNoise::FlipEdgeNoise(), THash< TIntPr, TEdgeInfo >::Gen(), THashSet< TInt >::Gen(), TSubGraphsEnum::Gen2Graphs(), TBlobBs::GenFFreeBlobPtV(), TMAGAffMtx::GenMtx(), TKronMtx::GenMtx(), TBlobBs::GetBlockLenV(), TLocClustStat::GetBoltzmanCurveStat(), TSvd::GetCfUncerV(), TStr::GetChStr(), TSnap::GetClustCf(), TVVec< TVal >::GetCol(), THash< TKey, TDat, THashFunc >::GetDatV(), TSparseHash< TKey, TDat, GroupSize >::GetDatV(), TStrHash< TDat, TStringPool, THashFunc >::GetDatV(), TSnap::GetDegCnt(), TSnap::GetDegSeqV(), TMAGParam< TNodeAttr >::GetDimV(), TTimeNENet::GetEdgeBuckets(), TTimeNENet::GetEdgeTmBuckets(), TTimeNENet::GetEIdByTm(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TBlobBs::GetFFreeBlobPtV(), TGraphAnf< PGraph >::GetGraphAnf(), TSnap::GetInDegCnt(), TGraphEnumUtils::GetIsoGraphs(), TGHash< TDat >::GetKeyIdByDat(), TGHash< TDat >::GetKeyIdByGSz(), THash< TKey, TDat, THashFunc >::GetKeyV(), TSparseHash< TKey, TDat, GroupSize >::GetKeyV(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyV(), TSparseSet< TKey, GroupSize >::GetKeyV(), TBPGraph::GetLNIdV(), TComb::GetNext(), TTimeNet::GetNIdByTm(), TTimeNENet::GetNIdByTm(), TUNGraph::GetNIdV(), TNGraph::GetNIdV(), TNEGraph::GetNIdV(), TBPGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TGraphAnf< PGraph >::GetNodeAnf(), TTimeNet::GetNodeBuckets(), TTimeNENet::GetNodeBuckets(), TSnap::GetNodeWcc(), TSnap::GetOutDegCnt(), TBPGraph::GetRNIdV(), TVVec< TVal >::GetRow(), TSnap::TSnapDetail::GetSphereDev(), TMacro::GetSrcSubstStrV(), TStrHash< TDat, TStringPool, THashFunc >::GetStrIdV(), TVec< TVal >::GetSubValV(), TQQueue< TInt >::GetSubValV(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TSnap::GetTreeSig(), TGStatVec::GetValV(), TMacro::GetVarNmV(), TLinReg::GetXV(), TSvd::GetXV(), TMAGFitBern::GradApxAffMtx(), TKroneckerLL::GradDescent(), TForestFire::Infect(), TForestFire::InfectAll(), TForestFire::InfectRnd(), TGraphAnf< PGraph >::InitAnfBits(), TKroneckerLL::InitLL(), TSimpleGraph::Join(), TKeyDatFl< TKey, TDat, THashFunc >::LoadDatV(), TKeyDatFl< TKey, TDat, THashFunc >::LoadKeyV(), TGnuPlot::LoadTs(), TMAGNodeBern::LoadTxt(), TMAGNodeBeta::LoadTxt(), TMAGFitBern::MakeCCDF(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TMom::NewV(), TSparseSVD::Project(), TWChA::PutCStr(), TKronNoise::RemoveEdgeNoise(), TKronMaxLL::RoundTheta(), TKroneckerLL::RunEStep(), TKroneckerLL::RunKronEM(), TKroneckerLL::SampleGradient(), TMAGNodeSimple::SaveTxt(), TMAGNodeBern::SaveTxt(), TMAGNodeBeta::SaveTxt(), TUniChDb::SbEx_Add(), TKroneckerLL::SetBestDegPerm(), TKroneckerLL::SetDegPerm(), TKroneckerLL::SetGraph(), TKroneckerLL::SetIPerm(), TKroneckerLL::SetOrderPerm(), TMAGAffMtx::SetRndMtx(), TKronMtx::SetRndMtx(), TKroneckerLL::SetRndPerm(), TSparseSVD::SimpleLanczos(), TMAGFitBern::SortAttrOrdering(), TSvd::Svd(), TSvd::Svd1Based(), TGStat::TakeConnComp(), TGStat::TakeDiam(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), TGStat::TakeSpectral(), TGStat::TakeTriadPart(), TBigStrPool::TBigStrPool(), TUniChDb::TestFindNextWordOrSentenceBoundary(), TKroneckerLL::TestSamplePerm(), TUniCodec::TestUtf16(), TUniCodec::TestUtf8(), TUniChDb::TestWbFindNonIgnored(), TFHash< TKey, TFDat, TVDat >::TFHash(), TGraphKey::TGraphKey(), TMAGFitBern::TMAGFitBern(), TMAGNodeBeta::TMAGNodeBeta(), TLAMisc::ToVec(), TSparseRowMatrix::TSparseRowMatrix(), TSubGraphEnum< TGraphCounter >::TSVec::TSVec(), TVecPool< TVal >::TVecPool(), TVec< TVal >::Union(), TMAGFitBern::UpdateApxPhiMI(), TMAGFitBern::UpdatePhi(), and TMAGFitBern::UpdatePhiMI().

                            {
    IAssert(0<=_Vals);
    if (ValT!=NULL && MxVals!=-1){delete[] ValT;} MxVals=Vals=_Vals;
    if (MxVals==0){ValT=NULL;} else {ValT=new TVal[MxVals];}}

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Gen ( const int &  _MxVals,
const int &  _Vals 
) [inline]

Definition at line 446 of file ds.h.

                                                {
    IAssert((0<=_Vals)&&(_Vals<=_MxVals));
    if (ValT!=NULL  && MxVals!=-1){delete[] ValT;} MxVals=_MxVals; Vals=_Vals;
    if (_MxVals==0){ValT=NULL;} else {ValT=new TVal[_MxVals];}}
template<class TVal>
void TVec< TVal >::GenExt ( TVal *  _ValT,
const int &  _Vals 
) [inline]

Definition at line 450 of file ds.h.

Referenced by TUNGraph::AddNode(), TNGraph::AddNode(), and TVecPool< TInt >::GetV().

                                            {
    if (ValT!=NULL && MxVals!=-1){delete[] ValT;}
    MxVals=-1; Vals=_Vals; ValT=_ValT;}

Here is the caller graph for this function:

template<class TVal>
TVal& TVec< TVal >::GetAddDat ( const TVal &  Val) [inline]

Definition at line 675 of file ds.h.

                                  {
    Assert(MxVals!=-1);
    int ValN=SearchForw(Val);
    if (ValN==-1){Add(Val); return Last();}
    else {return operator[](ValN);}}
template<class TVal>
TVal& TVec< TVal >::GetDat ( const TVal &  Val) const [inline]

Definition at line 672 of file ds.h.

Referenced by TBPGraph::DelEdge(), TGHash< TDat >::GetNodeMap(), and TNetInfBs::SaveObjInfo().

                                      {
    int ValN=SearchForw(Val);
    return operator[](ValN);}

Here is the caller graph for this function:

template<class TVal>
TIter TVec< TVal >::GetI ( const int &  ValN) const [inline]

Definition at line 479 of file ds.h.

Referenced by TSparseTable< THashKeyDat, GroupSize >::GetI().

{return ValT+ValN;}

Here is the caller graph for this function:

template<class TVal>
int TVec< TVal >::GetMemUsed ( ) const [inline]

Definition at line 436 of file ds.h.

Referenced by TWChA::GetMemUsed(), TFHash< TKey, TFDat, TVDat >::GetMemUsed(), THash< TIntPr, TEdgeInfo >::GetMemUsed(), TSparseTable< THashKeyDat, GroupSize >::GetMemUsed(), THashSet< TInt >::GetMemUsed(), and TTree< TVal >::GetMemUsed().

                         {
    return 2*sizeof(int)+sizeof(TVal*)+MxVals*sizeof(TVal);}

Here is the caller graph for this function:

template<class TVal >
int TVec< TVal >::GetMxValN ( ) const

Definition at line 1350 of file ds.h.

                                {
  if (Vals==0){return -1;}
  int MxValN=0;
  for (int ValN=1; ValN<Vals; ValN++){
    if (ValT[ValN]>ValT[MxValN]){MxValN=ValN;}
  }
  return MxValN;
}
template<class TVal >
int TVec< TVal >::GetPivotValN ( const int &  LValN,
const int &  RValN 
) const

Definition at line 1031 of file ds.h.

References TInt::GetRnd().

                                                                     {
  int SubVals=RValN-LValN+1;
  int ValN1=LValN+TInt::GetRnd(SubVals);
  int ValN2=LValN+TInt::GetRnd(SubVals);
  int ValN3=LValN+TInt::GetRnd(SubVals);
  const TVal& Val1=ValT[ValN1];
  const TVal& Val2=ValT[ValN2];
  const TVal& Val3=ValT[ValN3];
  if (Val1<Val2){
    if (Val2<Val3){return ValN2;}
    else if (Val3<Val1){return ValN1;}
    else {return ValN3;}
  } else {
    if (Val1<Val3){return ValN1;}
    else if (Val3<Val2){return ValN2;}
    else {return ValN3;}
  }
}

Here is the call graph for this function:

template<class TVal>
template<class TCmp >
static TIter TVec< TVal >::GetPivotValNCmp ( const TIter BI,
const TIter EI,
const TCmp Cmp 
) [inline, static]

Definition at line 566 of file ds.h.

Referenced by TVec< THKeyDat >::QSortCmp().

                                                                                  {
    const int SubVals=int(EI-BI);
    const int ValN1=TInt::GetRnd(SubVals);
    const int ValN2=TInt::GetRnd(SubVals);
    const int ValN3=TInt::GetRnd(SubVals);
    const TVal& Val1 = *(BI+ValN1);
    const TVal& Val2 = *(BI+ValN2);
    const TVal& Val3 = *(BI+ValN3);
    if (Cmp(Val1, Val2)) {
      if (Cmp(Val2, Val3)) return BI+ValN2;
      else if (Cmp(Val3, Val1)) return BI+ValN1;
      else return BI+ValN3;
    } else {
      if (Cmp(Val1, Val3)) return BI+ValN1;
      else if (Cmp(Val3, Val2)) return BI+ValN2;
      else return BI+ValN3;
    }
  }

Here is the caller graph for this function:

template<class TVal >
int TVec< TVal >::GetPrimHashCd ( ) const

Definition at line 800 of file ds.h.

Referenced by TMAGAffMtx::GetPrimHashCd(), TKronMtx::GetPrimHashCd(), TGraphKey::GetPrimHashCd(), and TTree< TVal >::GetPrimHashCd().

                                    {
  int HashCd=0;
  for (int ValN=0; ValN<Vals; ValN++){
    HashCd+=ValT[ValN].GetPrimHashCd();}
  return abs(HashCd);
}

Here is the caller graph for this function:

template<class TVal >
int TVec< TVal >::GetSecHashCd ( ) const

Definition at line 808 of file ds.h.

Referenced by TMAGAffMtx::GetSecHashCd(), TKronMtx::GetSecHashCd(), TGraphKey::GetSecHashCd(), and TTree< TVal >::GetSecHashCd().

                                   {
  int HashCd=0;
  for (int ValN=0; ValN<Vals; ValN++){
    HashCd+=ValT[ValN].GetSecHashCd();}
  return abs(HashCd);
}

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::GetSubValV ( const int &  BValN,
const int &  EValN,
TVec< TVal > &  ValV 
) const

Definition at line 938 of file ds.h.

References TVec< TVal >::Add(), TVec< TVal >::Gen(), TInt::GetInRng(), and TInt::GetMx().

Referenced by TKroneckerLL::ChainGelmapRubinPlot(), TWChA::GetSubWChA(), TWChA::IsPrefix(), TWChA::IsSufix(), TMAGFitBern::NextPermutation(), and TLocClustStat::Run().

                                                                  {
  int BValN=TInt::GetInRng(_BValN, 0, Len()-1);
  int EValN=TInt::GetInRng(_EValN, 0, Len()-1);
  int SubVals=TInt::GetMx(0, EValN-BValN+1);
  SubValV.Gen(SubVals, 0);
  for (int ValN=BValN; ValN<=EValN; ValN++){
    SubValV.Add(GetVal(ValN));}
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1) [inline, static]

Definition at line 682 of file ds.h.

Referenced by TAGM::GVizComGraph(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TLocClust::SavePajek(), TBigNet< TNodeData, IsDir >::SetInNIdV(), and TBigNet< TNodeData, IsDir >::SetOutNIdV().

                                          {
    TVec<TVal> V(1, 0); V.Add(Val1); return V;}

Here is the caller graph for this function:

template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2 
) [inline, static]

Definition at line 684 of file ds.h.

                                                            {
    TVec<TVal> V(2, 0); V.Add(Val1); V.Add(Val2); return V;}
template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3 
) [inline, static]

Definition at line 686 of file ds.h.

                                                                              {
    TVec<TVal> V(3, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); return V;}
template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4 
) [inline, static]

Definition at line 688 of file ds.h.

                                                                                                {
    TVec<TVal> V(4, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); return V;}
template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5 
) [inline, static]

Definition at line 690 of file ds.h.

                                                                                                                  {
    TVec<TVal> V(5, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); V.Add(Val5); return V;}
template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5,
const TVal &  Val6 
) [inline, static]

Definition at line 692 of file ds.h.

                                                                                                                                    {
    TVec<TVal> V(6, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); V.Add(Val5); V.Add(Val6); return V;}
template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5,
const TVal &  Val6,
const TVal &  Val7 
) [inline, static]

Definition at line 694 of file ds.h.

                                                                                                                                                      {
    TVec<TVal> V(7, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); V.Add(Val5); V.Add(Val6); V.Add(Val7); return V;}
template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5,
const TVal &  Val6,
const TVal &  Val7,
const TVal &  Val8 
) [inline, static]

Definition at line 696 of file ds.h.

                                                                                                                                                                        {
    TVec<TVal> V(8, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); V.Add(Val5); V.Add(Val6); V.Add(Val7); V.Add(Val8); return V;}
template<class TVal>
static TVec<TVal> TVec< TVal >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5,
const TVal &  Val6,
const TVal &  Val7,
const TVal &  Val8,
const TVal &  Val9 
) [inline, static]

Definition at line 698 of file ds.h.

                                                                                                                                                                                          {
    TVec<TVal> V(9, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); V.Add(Val5); V.Add(Val6); V.Add(Val7); V.Add(Val8); V.Add(Val9); return V;}
template<class TVal>
const TVal& TVec< TVal >::GetVal ( const int &  ValN) const [inline]

Definition at line 493 of file ds.h.

Referenced by TVec< TVal >::Diff(), TVec< TVal >::Intrs(), TVec< TVal >::IntrsLen(), TVec< THKeyDat >::Last(), and TVec< TVal >::Union().

{return operator[](ValN);}

Here is the caller graph for this function:

template<class TVal>
TVal& TVec< TVal >::GetVal ( const int &  ValN) [inline]

Definition at line 494 of file ds.h.

{return operator[](ValN);}
template<class TVal >
TStr TVec< TVal >::GetXOutOfBoundsErrMsg ( const int &  ValN) const [protected]

Definition at line 733 of file ds.h.

References TInt::GetStr(), and GetTypeNm().

Referenced by TVec< THKeyDat >::LastLast(), and TVec< THKeyDat >::operator[]().

                                                            {
  return TStr()+
    "Index:"+TInt::GetStr(ValN)+
    " Vals:"+TInt::GetStr(Vals)+
    " MxVals:"+TInt::GetStr(MxVals)+
    " Type:"+GetTypeNm(*this);
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Ins ( const int &  ValN,
const TVal &  Val 
)

Definition at line 949 of file ds.h.

References Assert.

Referenced by TExpHelp::GetCatNmV().

                                                    {
  Assert(MxVals!=-1);
  Add(); Assert((0<=ValN)&&(ValN<Vals));
  for (int MValN=Vals-2; MValN>=ValN; MValN--){ValT[MValN+1]=ValT[MValN];}
  ValT[ValN]=Val;
}

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Intrs ( const TVec< TVal > &  ValV)

Definition at line 1168 of file ds.h.

                                            {
  TVec<TVal> IntrsVec;
  Intrs(ValV, IntrsVec);
  MoveFrom(IntrsVec);
}
template<class TVal>
void TVec< TVal >::Intrs ( const TVec< TVal > &  ValV,
TVec< TVal > &  DstValV 
) const

Definition at line 1196 of file ds.h.

References TVec< TVal >::Add(), TVec< TVal >::Clr(), TVec< TVal >::GetVal(), and TVec< TVal >::Len().

                                                                        {
  DstValV.Clr();
  int ValN1=0; int ValN2=0;
  while ((ValN1<Len())&&(ValN2<ValV.Len())){
    const TVal& Val1=GetVal(ValN1);
    while ((ValN2<ValV.Len())&&(Val1>ValV.GetVal(ValN2))){
      ValN2++;}
    if ((ValN2<ValV.Len())&&(Val1==ValV.GetVal(ValN2))){
      DstValV.Add(Val1); ValN2++;}
    ValN1++;
  }
}

Here is the call graph for this function:

template<class TVal>
int TVec< TVal >::IntrsLen ( const TVec< TVal > &  ValV) const

Get the size of the intersection (number of common elements) of two vectors. Method assumes both vectors are sorted in ascending order!

Definition at line 1274 of file ds.h.

References TVec< TVal >::GetVal(), and TVec< TVal >::Len().

                                                     {
  int Cnt=0, ValN1=0; int ValN2=0;
  while ((ValN1<Len())&&(ValN2<ValV.Len())){
    const TVal& Val1=GetVal(ValN1);
    while ((ValN2<ValV.Len())&&(Val1>ValV.GetVal(ValN2))){
      ValN2++;}
    if ((ValN2<ValV.Len())&&(Val1==ValV.GetVal(ValN2))){
      ValN2++; Cnt++;}
    ValN1++;
  }
  return Cnt;
}

Here is the call graph for this function:

template<class TVal>
bool TVec< TVal >::IsExt ( ) const [inline]

Definition at line 453 of file ds.h.

{return MxVals==-1;}
template<class TVal>
bool TVec< TVal >::IsIn ( const TVal &  Val) const [inline]

Definition at line 667 of file ds.h.

Referenced by THtmlLx::IsArg(), TXmlLx::IsArgNm(), TPreproc::IsSubstId(), TSs::LoadTxt(), TNIBs::SaveInferred(), TNIBs::SaveInferredPajek(), and TPreproc::TPreproc().

{return SearchForw(Val)!=-1;}

Here is the caller graph for this function:

template<class TVal>
bool TVec< TVal >::IsIn ( const TVal &  Val,
int &  ValN 
) const [inline]

Definition at line 668 of file ds.h.

                                              {
    ValN=SearchForw(Val); return ValN!=-1;}
template<class TVal>
bool TVec< TVal >::IsInBin ( const TVal &  Val) const [inline]

Definition at line 670 of file ds.h.

{return SearchBin(Val)!=-1;}
template<class TVal >
void TVec< TVal >::ISort ( const int &  MnLValN,
const int &  MxRValN,
const bool &  Asc 
)

Definition at line 1013 of file ds.h.

                                                         {
  if (MnLValN<MxRValN){
    for (int ValN1=MnLValN+1; ValN1<=MxRValN; ValN1++){
      TVal Val=ValT[ValN1]; int ValN2=ValN1;
      if (Asc){
        while ((ValN2>MnLValN)&&(ValT[ValN2-1]>Val)){
          ValT[ValN2]=ValT[ValN2-1]; ValN2--;}
      } else {
        while ((ValN2>MnLValN)&&(ValT[ValN2-1]<Val)){
          ValT[ValN2]=ValT[ValN2-1]; ValN2--;}
      }
      ValT[ValN2]=Val;
    }
  }
}
template<class TVal>
template<class TCmp >
static void TVec< TVal >::ISortCmp ( TIter  BI,
TIter  EI,
const TCmp Cmp 
) [inline, static]

Definition at line 606 of file ds.h.

Referenced by TVec< THKeyDat >::QSortCmp().

                                                            {
    if (BI + 1 < EI) {
      for (TIter i = BI, j; i != EI; ++i) {
        TVal Tmp = *i; j = i;
        while (j > BI && Cmp(Tmp, *(j-1))) { *j = *(j-1); --j; }
        *j = Tmp;
      }
    }
  }

Here is the caller graph for this function:

template<class TVal >
bool TVec< TVal >::IsSorted ( const bool &  Asc = true) const

Definition at line 1090 of file ds.h.

Referenced by TBigNet< TNodeData, IsDir >::AddNode(), TBigNet< TNodeData, IsDir >::AddUndirNode(), TSnap::GenDegSeq(), TNodeNet< TNodeData >::IsOk(), TUNGraph::IsOk(), TNGraph::IsOk(), TNodeEDatNet< TNodeData, TEdgeData >::IsOk(), TNEGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TStatTest::KsTest(), TGnuPlot::MakeExpBins(), and TBigNet< TNodeData, IsDir >::SortEdgeV().

                                               {
  if (Asc){
    for (int ValN=0; ValN<Vals-1; ValN++){
      if (ValT[ValN]>ValT[ValN+1]){return false;}}
  } else {
    for (int ValN=0; ValN<Vals-1; ValN++){
      if (ValT[ValN]<ValT[ValN+1]){return false;}}
  }
  return true;
}

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
bool TVec< TVal >::IsSortedCmp ( const TCmp Cmp) const [inline]

Definition at line 643 of file ds.h.

                                          {
    if (EndI() == BegI()) return true;
    for (TIter i = BegI(); i != EndI()-1; ++i) {
      if (Cmp(*(i+1), *i)){return false;}}
    return true;
  }
template<class TVal>
TVal& TVec< TVal >::Last ( ) [inline]

Definition at line 468 of file ds.h.

{return GetVal(Len()-1);}
template<class TVal>
const TVal& TVec< TVal >::LastLast ( ) const [inline]

Definition at line 470 of file ds.h.

Referenced by TGraphAnf< PGraph >::GetGraphAnf().

Here is the caller graph for this function:

template<class TVal>
TVal& TVec< TVal >::LastLast ( ) [inline]

Definition at line 473 of file ds.h.

template<class TVal>
int TVec< TVal >::LastValN ( ) const [inline]

Definition at line 469 of file ds.h.

{return Len()-1;}
template<class TVal>
int TVec< TVal >::Len ( ) const [inline]

Definition at line 465 of file ds.h.

Referenced by TSnap::TSnapDetail::_GirvanNewmanGetModularity(), THist::Add(), TNetInfBs::AddCasc(), TNIBs::AddCasc(), TLocClustStat::AddCut(), TGnuPlot::AddErrBar(), TJsonVal::AddEscapeChAFromStr(), TGnuPlot::AddExpFit(), TGnuPlot::AddFunc(), THashSet< TKey, THashFunc >::AddKeyV(), TGnuPlot::AddLinFit(), TGnuPlot::AddLogFit(), TTree< TVal >::AddNode(), TGnuPlot::AddPlot(), TPp::AddPpV(), TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TSnap::AddSelfEdges(), TBigStrPool::AddStr(), TLocClustStat::AddToBestCutH(), TPackVec< TVal >::AddV(), TVecPool< TVal >::AddV(), TLinAlg::AddVec(), TUniCaseFolding::AppendVector(), anonymous_namespace{unicode.cpp}::AssertEq(), TLinAlg::AssertOrtogonality(), TSs::At(), TStatTest::AveVar(), TGStat::AvgGStat(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TUndirFFire::BurnGeoFire(), TSnap::TSnapDetail::CalcAvgDiamPdf(), TKroneckerLL::CalcChainR2(), TSnap::TSnapDetail::CalcEffDiam(), TCliqueOverlap::CalculateOverlapMtx(), TKroneckerLL::ChainGelmapRubinPlot(), TStatTest::ChiSquareOne(), TStatTest::ChiSquareTwo(), TSnap::CommunityGirvanNewman(), TUniChDb::Compose(), TMAGFitBern::ComputeJointAdjLL(), TMAGFitBern::ComputeJointOneLL(), TSnap::ConvertESubGraph(), TStrUtil::CountWords(), TGnuPlot::CreatePlotFile(), TUnicode::DecodeUtf16FromBytes(), TUnicode::DecodeUtf16FromWords(), TUniChDb::Decompose(), TUniChDb::DecomposeAndCompose(), TMom::Def(), TMom::DefV(), TSnap::DelDegKNodes(), THash< TIntPr, TEdgeInfo >::DelKeyIdV(), THashSet< TInt >::DelKeyIdV(), TVec< THKeyDat >::DelLast(), TSnap::DelNodes(), TFile::DelWc(), TSnap::DelZeroDegNodes(), TVec< TVal >::Diff(), TSnap::TSnapDetail::TGetSubGraph< PGraph, IsMultiGraph >::Do(), TSnap::TSnapDetail::TGetSubGraph< PGraph, false >::Do(), TSnap::TSnapDetail::TConvertSubGraph< POutGraph, PInGraph, IsMultiGraph >::Do(), TSnap::TSnapDetail::TConvertSubGraph< POutGraph, PInGraph, false >::Do(), TSnap::TSnapDetail::TDelSelfEdges< PGraph, IsMultiGraph >::Do(), TSnap::TSnapDetail::TDelSelfEdges< PGraph, true >::Do(), TLinAlg::DotProduct(), TGHash< TDat >::DrawGViz(), TLocClust::DrawWhiskers(), TMAGAffMtx::Dump(), TCnCom::Dump(), TKronMtx::Dump(), TSimpleGraph::Dump(), TSsParser::DumpStr(), TUnicode::EncodeUtf16ToBytes(), TUnicode::EncodeUtf16ToWords(), TSpecFunc::Entropy(), TSpecFunc::EntropyFracDim(), TSubGraphsEnum::EnumSubGraphs(), TLinAlg::EuclDist2(), TExp::EvalExp(), TSigmoid::EvaluateFit(), TCliqueOverlap::Expand(), TSpecFunc::ExpFit(), TUniChDb::ExtractStarters(), TNIBs::FG(), TLAMisc::FillRnd(), TNIBs::find_C(), TLocClust::FindBestCut(), TLocClustStat::FindBestCut(), TUnicode::FindNextSentenceBoundary(), TUnicode::FindNextWordBoundary(), TUniChDb::FindSentenceBoundaries(), TUnicode::FindSentenceBoundaries(), TUniChDb::FindWordBoundaries(), TUnicode::FindWordBoundaries(), TMBlobBs::FNextBlobPt(), TCodecBase::FromUnicode(), TSubGraphsEnum::Gen2Graphs(), TAGM::GenAGM(), TSnap::GenConfModel(), TSnap::GenDegSeq(), TFfGGen::GenFFGraphs(), TBlobBs::GenFFreeBlobPtV(), TSnap::GenGeoPrefAttach(), TSnap::GenPrefAttach(), TSnap::Get1CnCom(), TSnap::Get1CnComSzCnt(), TTimeNENet::Get1stEdgeNet(), TNetInfBs::GetAllCascProb(), TUnicode::GetAllCodecs(), TBlobBs::GetAllocInfo(), TExp::GetArgExps(), TEnv::GetArgs(), THtmlLx::GetArgs(), TXmlLx::GetArgs(), TMAGAffMtx::GetAvgAbsErr(), TKronMtx::GetAvgAbsErr(), TMAGAffMtx::GetAvgFroErr(), TKronMtx::GetAvgFroErr(), TNetInfBs::GetBestEdge(), TSnap::GetBetweennessCentr(), TSnap::GetBfsEffDiam(), TSnap::GetBiConSzCnt(), TExpBi::GetBiFuncVal(), TBlobBs::GetBlockLenV(), TLocClustStat::GetBoltzmanCurveStat(), TNetInfBs::GetBound(), THist::GetBuckets(), TForestFire::GetBurned(), TNetInfBs::GetCascs(), TExpHelp::GetCatNmV(), TGUtil::GetCCdf(), TPp::GetCcVals(), TGUtil::GetCdf(), TPp::GetChA(), TTree< TVal >::GetChildren(), TSnap::GetClustCf(), TSnap::GetCmnNbrs(), THttpResp::GetCookieKeyValDmPathQuV(), TKCore< PGraph >::GetCoreNodes(), TLocClustStat::GetCurveStat(), TLocClust::GetCutStat(), TUNGraph::TNode::GetDeg(), TBPGraph::TNode::GetDeg(), TBigNet< TNodeData, IsDir >::GetDelEdges(), TUrl::GetDocStrFromUrlStr(), TSnap::GetEDatSubGraph(), TSnap::GetEdgeBridges(), TTimeNENet::GetEdgeBuckets(), TGraphKey::GetEdges(), TSimpleGraph::GetEdges(), TSnap::GetEdgesInOut(), TTimeNENet::GetEdgeTmBuckets(), TNodeEDatNet< TNodeData, TEdgeData >::GetEI(), TTimeNENet::GetEIdByTm(), TSnap::GetEigenVectorCentr(), TSnap::GetEigVals(), TSnap::GetEigVec(), TSnap::GetESubGraph(), TTimeNENet::GetESubGraph(), TBlobBs::GetFFreeBlobPtV(), TForestFire::GetFireTm(), THttpResp::GetFldVal(), TZipIn::GetFLen(), TLocClustStat::TCutInfo::GetFracDegOut(), THtmlTok::GetFullStr(), TUrlEnv::GetFullUrlStr(), TGraphAnf< PGraph >::GetGraphAnf(), TExpHelpObj::GetHdArgNmStr(), TEnv::GetIfArgPrefixIntV(), TEnv::GetIfArgPrefixStrV(), TNodeNet< TNodeData >::TNode::GetInDeg(), TNGraph::TNode::GetInDeg(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetInDeg(), TNEGraph::TNode::GetInDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetInDeg(), TGraphEnumUtils::GetIndGraph(), TKronMtx::GetInitMtx(), TSnap::GetInvParticipRat(), TSnap::TSnapDetail::GetInvParticipRat(), TGraphEnumUtils::GetIsoGraphs(), TSnap::GetLen2Paths(), THash< TIntPr, TEdgeInfo >::GetMemUsed(), TGraphEnumUtils::GetMinAndGraphIds(), GetMinMax(), TSnap::GetModularity(), TMAGAffMtx::GetMtx(), TKronMtx::GetMtx(), TSnap::GetMxBiCon(), TSnap::GetMxDegNId(), TSnap::GetMxInDegNId(), THash< TIntPr, TEdgeInfo >::GetMxKeyIds(), TStrHash< TDat, TStringPool, THashFunc >::GetMxKeyIds(), THashSet< TInt >::GetMxKeyIds(), TSnap::GetMxOutDegNId(), TSnap::GetMxScc(), TSnap::GetMxWcc(), TSnap::GetMxWccSz(), TComb::GetNext(), TUniChDb::TUcdFileReader::GetNextLine(), TTimeNet::GetNIdByTm(), TTimeNENet::GetNIdByTm(), TGraphAnf< PGraph >::GetNodeAnf(), TTimeNet::GetNodeBuckets(), TTimeNENet::GetNodeBuckets(), TSnap::GetNodeClustCf(), TGHash< TDat >::GetNodeMap(), TAGM::GetNodeMembership(), TTree< TVal >::GetNodes(), TSnap::GetNodesAtHop(), TSnap::GetNodesAtHops(), TExpHelp::GetObj(), TExpHelp::GetObjHdNmV(), TNodeNet< TNodeData >::TNode::GetOutDeg(), TNGraph::TNode::GetOutDeg(), TNodeEDatNet< TNodeData, TEdgeData >::TNode::GetOutDeg(), TNEGraph::TNode::GetOutDeg(), TNodeEdgeNet< TNodeData, TEdgeData >::TNode::GetOutDeg(), TCliqueOverlap::GetOverlapCliques(), TSnap::GetPageRank(), TGUtil::GetPdf(), TGraphEnumUtils::GetPermutations(), THash< TIntPr, TEdgeInfo >::GetPorts(), TStrHash< TDat, TStringPool, THashFunc >::GetPorts(), THashSet< TInt >::GetPorts(), TSpecFunc::GetPowerCoef(), TPp::GetPpN(), TPp::GetPps(), TTimeNENet::GetPrefAttach(), TSnap::GetRndESubGraph(), TBreathFS< PGraph >::GetRndPath(), TSnap::GetRndSubGraph(), TLocClust::GetRndWalkSup(), TGraphKey::GetSigLen(), TSnap::GetSngVals(), TSnap::GetSngVec(), TStr::GetSpaceStr(), TSnap::TSnapDetail::GetSphereDev(), TWChA::GetStr(), TStr::GetStr(), TSnap::GetSubGraph(), TTimeNet::GetSubGraph(), TTimeNENet::GetSubGraph(), TBigNet< TNodeData, IsDir >::GetSubGraph(), TBigNet< TNodeData, IsDir >::GetSubNGraph(), TXmlTok::GetTagTok(), TXmlTok::GetTagVal(), TXmlDoc::GetTagVal(), TTimeNet::GetTimeNENet(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TXmlTok::GetTokVStr(), TUrl::GetTopDownDocNm(), TSnap::GetTreeSig(), TTimeNENet::GetTriadEdges(), TSnap::GetTriads(), TSs::GetVal(), TPpVal::GetValStr(), TVecPool< TInt >::GetVecs(), TStr::GetWcMatch(), TUStr::GetWordUStrV(), TNcpGraphsBase::GetXAtMinY(), TSs::GetXLen(), TNcpGraphsBase::GetXYAtMinY(), TSs::GetYLen(), TGraphEnumUtils::GraphId(), TNetInfBs::GreedyOpt(), TSparseTable< THashKeyDat, GroupSize >::Groups(), TLinAlg::GS(), TAGM::GVizComGraph(), TNcpGraphsBase::Impose(), TUrlLxChDef::InclBoolV(), TNetInfBs::Init(), TNIBs::Init(), TTmInfo::InitDayOfWeekNmV(), TUniChDb::InitDerivedCoreProperties(), TUniChDb::InitLineBreaks(), TKroneckerLL::InitLL(), TTmInfo::InitMonthNmV(), TUniChDb::InitPropList(), TUniChDb::InitSpecialCasing(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TVec< TVal >::Intrs(), TVec< TVal >::IntrsLen(), TLinAlg::InverseSVD(), TSnap::IsAllValVNeg(), TExpEnv::IsFuncOk(), TGraphKey::IsIsomorph(), THash< TIntPr, TEdgeInfo >::IsKeyId(), TStrHash< TDat, TStringPool, THashFunc >::IsKeyId(), THashSet< TInt >::IsKeyId(), TBigNet< TNodeData, IsDir >::IsOk(), TBigNet< TNodeData, IsDir >::IsolateNode(), TGnuPlot::IsSameXCol(), TPreproc::IsSubstId(), TMom::IsUsableV(), TVecPool< TInt >::IsVId(), TStr::IsWcMatch(), TStatTest::KsTest(), TNIBs::LabelBurstAutomaton(), TSparseSVD::LanczosSVD(), TVec< THKeyDat >::Last(), TVec< THKeyDat >::LastValN(), TMAGAffMtx::Len(), TKronMtx::Len(), TUStr::Len(), TWChA::Len(), TCnCom::Len(), TLocClustStat::TNodeSweep::Len(), TGStatVec::Len(), THash< TIntPr, TEdgeInfo >::Len(), TStrHash< TDat, TStringPool, THashFunc >::Len(), THashSet< TInt >::Len(), TLinAlg::LinComb(), TSpecFunc::LinearFit(), TTimeNet::LoadArxiv(), TNetInfBs::LoadGroundTruthTxt(), TNIBs::LoadGroundTruthTxt(), TNIBs::LoadInferredTxt(), TLAMisc::LoadMatlabTFltVV(), TTimeNet::LoadPatents(), TGnuPlot::LoadTs(), TMAGNodeBern::LoadTxt(), TUniChDb::LoadTxt(), TUniChDb::LoadTxt_ProcessDecomposition(), THash< TKey, TDat, THashFunc >::LoadXml(), TExpHelp::LoadXml(), THashSet< TInt >::LoadXml(), TSpecFunc::LogFit(), LogSumExp(), TMAGFitBern::MakeCCDF(), TGUtil::MakeExpBins(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TVec< THKeyDat >::MakeHeap(), TSnap::MakeUnDir(), McMcGetAvgAvg(), McMcGetAvgJ(), TVec< TVal >::Merge(), TKroneckerLL::MetroGibbsSampleNext(), TLinAlg::Multiply(), TLinAlg::MultiplyScalar(), TLinAlg::MultiplyT(), TJsonVal::NewArr(), TMAGFitBern::NextPermutation(), TLinAlg::Norm2(), TGUtil::Normalize(), TMAGFitBern::NormalizeAffMtxV(), TLinAlg::NormL1(), TLinAlg::NormLinf(), TDGraphCounter::operator()(), TSNodeTest::operator()(), TExpVal::operator<(), TVec< TVal >::operator<(), TPackVec< TVal >::operator=(), TExpVal::operator==(), TVec< TVal >::operator==(), TUniChDb::TUcdFileReader::ParseCodePointList(), PlotAutoCorrelation(), TNcpGraphsBase::PlotAvgNcp(), TNcpGraphsBase::PlotBestWhisker(), TLocClustStat::PlotBoltzmanCurve(), TTimeNet::PlotCCfOverTm(), TKronMtx::PlotCmpGraphs(), TLocClust::PlotCutDistr(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TSnap::PlotEigValDistr(), TForestFire::PlotFire(), PlotGrad(), TSnap::PlotInDegDistr(), TSnap::PlotInvParticipRat(), TTimeNet::PlotMedianDegOverTm(), TTimeNet::PlotMissingPast(), TNcpGraphsBase::PlotNcpMin(), TLocClustStat::PlotNCPScatter(), TLocClustStat::PlotNcpTop10(), TSnap::PlotOutDegDistr(), TLocClust::PlotPhiDistr(), TNcpGraphsBase::PlotRewBestWhisker(), TNcpGraphsBase::PlotRewNcpMin(), TSnap::PlotSngValDistr(), TGnuPlot::PlotValCntH(), TGnuPlot::PlotValV(), TLocClust::PlotVolDistr(), TNGraphMtx::PMultiply(), TUNGraphMtx::PMultiply(), TSparseColMatrix::PMultiply(), TSparseRowMatrix::PMultiply(), TFullColMatrix::PMultiply(), TNGraphMtx::PMultiplyT(), TUNGraphMtx::PMultiplyT(), TSparseColMatrix::PMultiplyT(), TSparseRowMatrix::PMultiplyT(), TFullColMatrix::PMultiplyT(), TVec< THKeyDat >::PopHeap(), TSpecFunc::PowerFit(), TLAMisc::PrintTFltV(), TLAMisc::PrintTIntV(), TSparseSVD::Project(), TVec< THKeyDat >::PushHeap(), TMBlobBs::PutBlob(), TBlobBs::PutBlockLenV(), TPp::PutCcValV(), TBlobBs::PutFFreeBlobPtV(), TVecPool< TInt >::PutV(), TSs::PutVal(), TPp::PutVal(), TOLx::PutVarBoolV(), TOLx::PutVarFltV(), TOLx::PutVarIntV(), TOLx::PutVarStrPrV(), TOLx::PutVarStrV(), TOLx::PutVarStrVV(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TUnicode::RegisterCodec(), TKronNoise::RemoveNodeNoise(), TKroneckerLL::RestoreGraph(), TAGM::RndConnectInsideCommunity(), TKronMaxLL::RoundTheta(), TKroneckerLL::RunMStep(), TKroneckerLL::SampleNextPerm(), TBigStrPool::Save(), TNetInfBs::SaveCascades(), TLAMisc::SaveCsvTFltV(), TGHash< TDat >::SaveDetailTxt(), TTimeNENet::SaveEdgeTm(), TInt::SaveFrugalIntV(), TGraphKey::SaveGViz(), THtmlDoc::SaveHtmlToXml(), TNIBs::SaveInferred(), TNIBs::SaveInferredPajek(), TMBlobBs::SaveMain(), TLAMisc::SaveMatlabTFltIntKdV(), TLAMisc::SaveMatlabTFltV(), TLAMisc::SaveMatlabTIntV(), TNetInfBs::SaveObjInfo(), THist::SaveStat(), TGnuPlot::SaveTs(), TSs::SaveTxt(), TExpVal::SaveTxt(), TPpVal::SaveTxt(), TGraphKey::SaveTxt(), TCnCom::SaveTxt(), TWChA::SaveTxt(), TGStatVec::SaveTxt(), TPp::SaveTxt(), TExp::SaveTxt(), TNcpGraphsBase::SaveTxt(), TGHash< TDat >::SaveTxt(), THtmlDoc::SaveTxt(), TLocClustStat::SaveTxtInfo(), TNcpGraphsBase::SaveTxtNcpMin(), TUniChDb::SbEx_AddMulti(), TVec< TVal >::SearchVForw(), TSnap::SetAllInvertSign(), TMAGNodeBeta::SetBetaV(), TKroneckerLL::SetDegPerm(), TBigNet< TNodeData, IsDir >::SetInNIdV(), TKroneckerLL::SetIPerm(), TMAGParam< TMAGNodeBern >::SetMtxV(), TBigNet< TNodeData, IsDir >::SetOutNIdV(), TKroneckerLL::SetRandomEdges(), TTimeNENet::SetRndEdgeTimes(), TMAGAffMtx::SetRndMtx(), TKronMtx::SetRndMtx(), TNIBs::SG(), TQQueue< TInt >::Shuffle(), TSparseSVD::SimpleLanczos(), TSparseSVD::SimpleLanczosSVD(), TMAGFitBern::SortAttrOrdering(), TSparseOps< TKey, TDat >::SparseMerge(), TStrUtil::SplitLines(), TStrUtil::SplitOnCh(), TStrUtil::SplitSentences(), TStrUtil::SplitWords(), TLinAlg::SumVec(), TLAMisc::SumVec(), TGStat::TakeConnComp(), TGStat::TakeDiam(), TGraphKey::TakeSig(), TGStat::TakeSpectral(), TGStat::TakeTriadPart(), TCorr::TCorr(), TD34GraphCounter::TD34GraphCounter(), TUniCaseFolding::Test(), TSnap::TestAnf(), TUniChDb::TestCaseConversion(), TUniChDb::TestComposition(), TUniCodec::TestDecodeUtf16(), TUniCodec::TestDecodeUtf8(), TUniChDb::TestFindNextWordOrSentenceBoundary(), TKroneckerLL::TestSamplePerm(), TUniCodec::TestUtf16(), TUniCodec::TestUtf8(), TUniChDb::TestWbFindNonIgnored(), TFFile::TFFile(), TFullColMatrix::TFullColMatrix(), TGraphKey::TGraphKey(), THashSet< TKey, THashFunc >::THashSet(), THtmlHldV::THtmlHldV(), TTimeNet::TimeGrowth(), TTimeNENet::TimeGrowth(), TKronMtx::TKronMtx(), TMAGAffMtx::TMAGAffMtx(), TMAGNodeBeta::TMAGNodeBeta(), TMom::TMom(), TNcpGraphsBase::TNcpGraphsBase(), TLocClustStat::TNodeSweep::TNodeSweep(), TSsParser::ToLc(), TUrl::ToLcPath(), TLAMisc::ToSpVec(), TCodecBase::ToUnicode(), T8BitCodec< TEncoding_ISO8859_3 >::ToUnicode(), TLAMisc::ToVec(), TPreproc::TPreproc(), TSigmoid::TSigmoid(), TSparseRowMatrix::TSparseRowMatrix(), TStatTest::TTest(), TVec< TVal >::Union(), T8BitCodec< TEncoding_ISO8859_3 >::UniToStr(), TMAGFitBern::UnNormalizeAffMtxV(), TUnicode::UnregisterCodec(), TMAGFitBern::UpdateApxPhiMI(), and TUniCodec::WordsToBytes().

{return Vals;}

Here is the caller graph for this function:

template<class TVal >
void TVec< TVal >::Load ( TSIn SIn)

Definition at line 749 of file ds.h.

References TSIn::Load().

Referenced by THash< TIntPr, TEdgeInfo >::Load(), TFullColMatrix::Load(), TSparseTable< THashKeyDat, GroupSize >::Load(), TStrHash< TDat, TStringPool, THashFunc >::Load(), THashSet< TInt >::Load(), TUniChDb::Load(), and TVec< THKeyDat >::TVec().

                              {
  if ((ValT!=NULL)&&(MxVals!=-1)){delete[] ValT;}
  SIn.Load(MxVals); SIn.Load(Vals); MxVals=Vals;
  if (MxVals==0){ValT=NULL;} else {ValT=new TVal[MxVals];}
  for (int ValN=0; ValN<Vals; ValN++){
    ValT[ValN]=TVal(SIn);}
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal >
void TVec< TVal >::LoadXml ( const PXmlTok XmlTok,
const TStr Nm = "" 
)

Definition at line 103 of file xmlser.h.

References TPt< TRec >::LoadXml(), and XLoadHd.

                                                             {
  XLoadHd(Nm);
  int SubToks=XmlTok->GetSubToks(); Gen(SubToks, 0);
  for (int SubTokN=0; SubTokN<SubToks; SubTokN++){
    PXmlTok SubTok=XmlTok->GetSubTok(SubTokN);
    TVal Val; Val.LoadXml(SubTok, TStr()); Add(Val);
  }
}

Here is the call graph for this function:

template<class TVal>
void TVec< TVal >::MakeHeap ( ) [inline]

Definition at line 526 of file ds.h.

Referenced by TSnap::TSnapDetail::TCNMQMatrix::Init(), and TVec< THKeyDat >::MakeHeap().

{ MakeHeap(TLss<TVal>()); }                     // build a heap

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
void TVec< TVal >::MakeHeap ( const TCmp Cmp) [inline]

Definition at line 530 of file ds.h.

Referenced by TVec< THKeyDat >::MakeHeap().

{ MakeHeap(0, Len(), Cmp); }

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
void TVec< TVal >::MakeHeap ( const int &  First,
const int &  Len,
const TCmp Cmp 
) [inline]

Definition at line 557 of file ds.h.

                                                                   {
    if (Len < 2) { return; }
    int Parent = (Len-2)/2;
    while (true) {
      AdjustHeap(First, Parent, Len, ValT[First+Parent], Cmp);
      if (Parent == 0) { return; }  Parent--; }
  }
template<class TVal >
void TVec< TVal >::Merge ( )

Definition at line 1114 of file ds.h.

References Assert, TVec< TVal >::Len(), and TVec< TVal >::Sort().

Referenced by TUniChDb::InitWordAndSentenceBoundaryFlags().

                      {
  Assert(MxVals!=-1);
  TVec<TVal> SortedVec(*this); SortedVec.Sort();
  Clr();
  for (int ValN=0; ValN<SortedVec.Len(); ValN++){
    if ((ValN==0)||(SortedVec[ValN-1]!=SortedVec[ValN])){
      Add(SortedVec[ValN]);}
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Minus ( const TVec< TVal > &  ValV)

Definition at line 1189 of file ds.h.

                                            {
  TVec<TVal> MinusVec;
  Minus(ValV, MinusVec);
  MoveFrom(MinusVec);
}
template<class TVal>
void TVec< TVal >::Minus ( const TVec< TVal > &  ValV,
TVec< TVal > &  DstValV 
) const

Definition at line 1288 of file ds.h.

                                                                        {
  Diff(ValV, DstValV);
}
template<class TVal>
void TVec< TVal >::MoveFrom ( TVec< TVal > &  Vec)

Definition at line 864 of file ds.h.

References TVec< TVal >::MxVals, TVec< TVal >::Vals, and TVec< TVal >::ValT.

Referenced by TSpecFunc::EntropyFracDim(), and TSubGraphsEnum::Gen2Graphs().

                                        {
  if (this!=&Vec){
    if (ValT!=NULL && MxVals!=-1){delete[] ValT;}
    MxVals=Vec.MxVals; Vals=Vec.Vals; ValT=Vec.ValT;
    Vec.MxVals=0; Vec.Vals=0; Vec.ValT=NULL;
  }
}

Here is the caller graph for this function:

template<class TVal >
bool TVec< TVal >::NextPerm ( )

Definition at line 1125 of file ds.h.

References Swap().

Referenced by TGHash< TDat >::InitPermutations().

                          {
  // start with a sorted sequence to obtain all permutations
  int First = 0, Last = Len(), Next = Len()-1;
  if (Last < 2) return false;
  for(; ; ) {
    // find rightmost element smaller than successor
    int Next1 = Next;
    if (GetVal(--Next) < GetVal(Next1)) { // swap with rightmost element that's smaller, flip suffix
      int Mid = Last;
      for (; GetVal(Next) >= GetVal(--Mid); ) { }
      Swap(Next, Mid);
      Reverse(Next1, Last);
      return true;
    }
    if (Next == First) { // pure descending, flip all
      Reverse();
      return false;
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal>
TVec<TVal>& TVec< TVal >::operator+ ( const TVal &  Val) [inline]

Definition at line 427 of file ds.h.

{Add(Val); return *this;}
template<class TVal>
bool TVec< TVal >::operator< ( const TVec< TVal > &  Vec) const

Definition at line 785 of file ds.h.

References TVec< TVal >::Len(), and TVec< TVal >::ValT.

                                                      {
  if (this==&Vec){return false;}
  if (Len()==Vec.Len()){
    for (int ValN=0; ValN<Vals; ValN++){
      if (ValT[ValN]<Vec.ValT[ValN]){return true;}
      else if (ValT[ValN]>Vec.ValT[ValN]){return false;}
      else {}
    }
    return false;
  } else {
    return Len()<Vec.Len();
  }
}

Here is the call graph for this function:

template<class TVal>
TVec< TVal > & TVec< TVal >::operator= ( const TVec< TVal > &  Vec)

Definition at line 765 of file ds.h.

References TVec< TVal >::Vals, and TVec< TVal >::ValT.

                                                      {
  if (this!=&Vec){
    if ((ValT!=NULL)&&(MxVals!=-1)){delete[] ValT;}
    MxVals=Vals=Vec.Vals;
    if (MxVals==0){ValT=NULL;} else {ValT=new TVal[MxVals];}
    for (int ValN=0; ValN<Vec.Vals; ValN++){ValT[ValN]=Vec.ValT[ValN];}
  }
  return *this;
}
template<class TVal>
bool TVec< TVal >::operator== ( const TVec< TVal > &  Vec) const

Definition at line 776 of file ds.h.

References TVec< TVal >::Len(), and TVec< TVal >::ValT.

                                                       {
  if (this==&Vec){return true;}
  if (Len()!=Vec.Len()){return false;}
  for (int ValN=0; ValN<Vals; ValN++){
    if (ValT[ValN]!=Vec.ValT[ValN]){return false;}}
  return true;
}

Here is the call graph for this function:

template<class TVal>
const TVal& TVec< TVal >::operator[] ( const int &  ValN) const [inline]

Definition at line 430 of file ds.h.

Referenced by TVec< THKeyDat >::GetAddDat(), TVec< THKeyDat >::GetDat(), and TVec< THKeyDat >::GetVal().

                                                {
    AssertR((0<=ValN)&&(ValN<Vals), GetXOutOfBoundsErrMsg(ValN));
    return ValT[ValN];}

Here is the caller graph for this function:

template<class TVal>
TVal& TVec< TVal >::operator[] ( const int &  ValN) [inline]

Definition at line 433 of file ds.h.

                                   {
    AssertR((0<=ValN)&&(ValN<Vals), GetXOutOfBoundsErrMsg(ValN));
    return ValT[ValN];}
template<class TVal >
int TVec< TVal >::Partition ( const int &  MnLValN,
const int &  MxRValN,
const bool &  Asc 
)

Definition at line 1051 of file ds.h.

References forever, and Swap().

                                                         {
  int PivotValN=GetPivotValN(MnLValN, MxRValN);
  Swap(PivotValN, MnLValN);
  TVal PivotVal=ValT[MnLValN];
  int LValN=MnLValN-1; int RValN=MxRValN+1;
  forever {
    if (Asc){
      do {RValN--;} while (ValT[RValN]>PivotVal);
      do {LValN++;} while (ValT[LValN]<PivotVal);
    } else {
      do {RValN--;} while (ValT[RValN]<PivotVal);
      do {LValN++;} while (ValT[LValN]>PivotVal);
    }
    if (LValN<RValN){Swap(LValN, RValN);}
    else {return RValN;}
  };
}

Here is the call graph for this function:

template<class TVal>
template<class TCmp >
static TIter TVec< TVal >::PartitionCmp ( TIter  BI,
TIter  EI,
const TVal  Pivot,
const TCmp Cmp 
) [inline, static]

Definition at line 586 of file ds.h.

Referenced by TVec< THKeyDat >::QSortCmp().

                                                                                   {
    forever {
      while (Cmp(*BI, Pivot)) ++BI;
      --EI;
      while (Cmp(Pivot, *EI)) --EI;
      if (!(BI < EI)) return BI;
      SwapI(BI, EI);
      ++BI;
    }
  }

Here is the caller graph for this function:

template<class TVal>
TVal TVec< TVal >::PopHeap ( ) [inline]

Definition at line 529 of file ds.h.

Referenced by TSnap::TSnapDetail::TCNMQMatrix::FindMxQEdge(), and TVec< THKeyDat >::PopHeap().

{ return PopHeap(TLss<TVal>()); }                // remove largest element

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
TVal TVec< TVal >::PopHeap ( const TCmp Cmp) [inline]

Definition at line 532 of file ds.h.

                                                      { IAssert(! Empty()); const TVal Top=ValT[0];
    ValT[0]=Last(); DelLast(); if (! Empty()) { AdjustHeap(0, 0, Len(), ValT[0], Cmp); } return Top; }
template<class TVal >
bool TVec< TVal >::PrevPerm ( )

Definition at line 1147 of file ds.h.

References Swap().

                          {
  int First = 0, Last = Len(), Next = Len()-1;
  if (Last < 2) return false;
  for(; ; ) {
    // find rightmost element not smaller than successor
    int Next1 = Next;
    if (GetVal(--Next) >= GetVal(Next1)) { // swap with rightmost element that's not smaller, flip suffix
      int Mid = Last;
      for (; GetVal(Next) < GetVal(--Mid); ) { }
      Swap(Next, Mid);
      Reverse(Next1, Last);
      return true;
    }
    if (Next == First) { // pure descending, flip all
      Reverse();
      return false;
    }
  }
}

Here is the call graph for this function:

template<class TVal>
void TVec< TVal >::PushHeap ( const TVal &  Val) [inline]

Definition at line 527 of file ds.h.

Referenced by TVec< THKeyDat >::AdjustHeap(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), and TVec< THKeyDat >::PushHeap().

{ PushHeap(Val, TLss<TVal>()); } // add element to the heap

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
void TVec< TVal >::PushHeap ( const TVal &  Val,
const TCmp Cmp 
) [inline]

Definition at line 531 of file ds.h.

Referenced by TVec< THKeyDat >::PushHeap().

{ Add(Val); PushHeap(0, Len()-1, 0, Val, Cmp); }

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
void TVec< TVal >::PushHeap ( const int &  First,
int  HoleIdx,
const int &  Top,
TVal  Val,
const TCmp Cmp 
) [inline]

Definition at line 536 of file ds.h.

                                                                                          {
    int Parent = (HoleIdx-1)/2;
    while (HoleIdx > Top && Cmp(ValT[First+Parent], Val)) {
      ValT[First+HoleIdx] = ValT[First+Parent];
      HoleIdx = Parent;  Parent = (HoleIdx-1)/2; }
    ValT[First+HoleIdx] = Val;
  }
template<class TVal >
void TVec< TVal >::QSort ( const int &  MnLValN,
const int &  MxRValN,
const bool &  Asc 
)

Definition at line 1071 of file ds.h.

Referenced by TSnap::GetTreeSig().

                                                         {
  if (MnLValN<MxRValN){
    if (MxRValN-MnLValN<20){
      ISort(MnLValN, MxRValN, Asc);
    } else {
      int SplitValN=Partition(MnLValN, MxRValN, Asc);
      QSort(MnLValN, SplitValN, Asc);
      QSort(SplitValN+1, MxRValN, Asc);
    }
  }
}

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
static void TVec< TVal >::QSortCmp ( TIter  BI,
TIter  EI,
const TCmp Cmp 
) [inline, static]

Definition at line 617 of file ds.h.

Referenced by TVec< THKeyDat >::QSortCmp(), and TVec< THKeyDat >::SortCmp().

                                                            {
    if (BI + 1 < EI) {
      if (EI - BI < 20) {
        ISortCmp(BI, EI, Cmp); }
      else {
        const TVal Val = *GetPivotValNCmp(BI, EI, Cmp);
        TIter Split = PartitionCmp(BI, EI, Val, Cmp);
        QSortCmp(BI, Split, Cmp);
        QSortCmp(Split, EI, Cmp);
      }
    }
  }

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Reserve ( const int &  _MxVals,
const int &  _Vals 
) [inline]

Definition at line 455 of file ds.h.

                                                    {
    IAssert((0<=_Vals)&&(_Vals<=_MxVals));
    Resize(_MxVals); Vals=_Vals;}
template<class TVal>
int TVec< TVal >::Reserved ( ) const [inline]
template<class TVal >
void TVec< TVal >::Resize ( const int &  _MxVals = -1) [protected]

Definition at line 705 of file ds.h.

References Assert, TStr::CStr(), FailR, TStr::Fmt(), GetTypeNm(), and IAssertR.

Referenced by TVec< THKeyDat >::Add(), and TVec< THKeyDat >::Reserve().

                                         {
  IAssertR(MxVals!=-1, TStr::Fmt("Can not resize buffer. %s. [Program failed to allocate more memory. Solution: Get a bigger machine and a 64-bit compiler.]", GetTypeNm(*this).CStr()).CStr());
  if (_MxVals==-1){
    if (Vals==0){MxVals=16;} else {MxVals*=2;}
  } else {
    if (_MxVals<=MxVals){return;} else {MxVals=_MxVals;}
  }
  if (ValT==NULL){
    try {ValT=new TVal[MxVals];}
    catch (std::exception Ex){
      FailR(TStr::Fmt("TVec::Resize 1: %s, Vals:%d, MxVals:%d, _MxVals:%d, Type:%s [Program failed to allocate more memory. Solution: Get a bigger machine and a 64-bit compiler.]",
       Ex.what(), Vals, MxVals, _MxVals, GetTypeNm(*this).CStr()).CStr());}
  } else {
    //if (Vals > 1000000) {
    //  printf("%s resize %d -> %d\n", GetTypeNm(*this).CStr(), Vals, MxVals); }
    TVal* NewValT = NULL;
    try {
      NewValT=new TVal[MxVals];}
    catch (std::exception Ex){
      FailR(TStr::Fmt("TVec::Resize 2: %s, Vals:%d, MxVals:%d, _MxVals:%d, Type:%s [Program failed to allocate more memory. Solution: Get a bigger machine and a 64-bit compiler.]",
       Ex.what(), Vals, MxVals, _MxVals, GetTypeNm(*this).CStr()).CStr());}
    Assert(NewValT!=NULL);
    for (int ValN=0; ValN<Vals; ValN++){NewValT[ValN]=ValT[ValN];}
    delete[] ValT; ValT=NewValT;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal >
void TVec< TVal >::Reverse ( )

Definition at line 1108 of file ds.h.

References Swap().

Referenced by TSpecFunc::EntropyFracDim(), TBreathFS< PGraph >::GetRndPath(), and TStr::IsWcMatch().

                        {
  for (int ValN=0; ValN<Vals/2; ValN++){
    Swap(ValN, Vals-ValN-1);}
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Reverse ( int  First,
int  Last 
) [inline]

Definition at line 518 of file ds.h.

                                   {
    Last--; while (First < Last){Swap(First++, Last--);}}
template<class TVal >
void TVec< TVal >::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 113 of file xmlser.h.

References TInt::GetStr(), and XSaveHdArg.

                                                          {
  XSaveHdArg(Nm, "Vals", TInt::GetStr(Vals));
  for (int ValN=0; ValN<Vals; ValN++){ValT[ValN].SaveXml(SOut, TStr());}
}

Here is the call graph for this function:

template<class TVal>
int TVec< TVal >::SearchBack ( const TVal &  Val) const

Definition at line 1330 of file ds.h.

                                                {
  for (int ValN=Vals-1; ValN>=0; ValN--){
    if (Val==ValT[ValN]){return ValN;}}
  return -1;
}
template<class TVal>
int TVec< TVal >::SearchBin ( const TVal &  Val,
int &  InsValN 
) const

Definition at line 1312 of file ds.h.

                                                             {
  int LValN=0; int RValN=Len()-1;
  while (RValN>=LValN){
    int ValN=(LValN+RValN)/2;
    if (Val==ValT[ValN]){InsValN=ValN; return ValN;}
    if (Val<ValT[ValN]){RValN=ValN-1;} else {LValN=ValN+1;}
  }
  InsValN=LValN; return -1;
}
template<class TVal>
int TVec< TVal >::SearchForw ( const TVal &  Val,
const int &  BValN = 0 
) const
template<class TVal>
int TVec< TVal >::SearchVForw ( const TVec< TVal > &  ValV,
const int &  BValN = 0 
) const

Definition at line 1337 of file ds.h.

References TVec< TVal >::Len().

Referenced by TWChA::SearchStr().

                                                                          {
  int ValVLen=ValV.Len();
  for (int ValN=BValN; ValN<Vals-ValVLen+1; ValN++){
    bool Found=true;
    for (int SubValN=0; SubValN<ValVLen; SubValN++){
      if (ValV[SubValN]!=GetVal(ValN+SubValN)){Found=false; break;}
    }
    if (Found){return ValN;}
  }
  return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal >
void TVec< TVal >::Shuffle ( TRnd Rnd)
template<class TVal >
void TVec< TVal >::Sort ( const bool &  Asc = true)

Definition at line 1085 of file ds.h.

Referenced by TUNGraph::AddNode(), TNGraph::AddNode(), TGnuPlot::AddPlot(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TMom::Def(), TMAGFitBern::DoEStepOneIter(), TLocClust::DrawWhiskers(), TMAGAffMtx::Dump(), TKronMtx::Dump(), TSubGraphsEnum::EnumSubGraphs(), TBiConVisitor::FinishNode(), TSubGraphsEnum::Gen2Graphs(), TBlobBs::GenBlockLenV(), TMAGAffMtx::GetAvgAbsErr(), TKronMtx::GetAvgAbsErr(), TMAGAffMtx::GetAvgFroErr(), TKronMtx::GetAvgFroErr(), TNetInfBs::GetBestEdge(), TSnap::GetBfsEffDiam(), TSnap::GetBiConSzCnt(), TNetInfBs::GetBound(), TSnap::GetClustCf(), TCliqueOverlap::GetCPMCommunities(), TLocClustStat::GetCurveStat(), TSnap::GetDegCnt(), TTimeNENet::GetEdgeTmBuckets(), TTimeNENet::GetEIdByTm(), TSnap::GetEigVals(), TSnap::GetEigVec(), TSnap::GetInDegCnt(), TSnap::GetInvParticipRat(), TGHash< TDat >::GetKeyIdByDat(), TGHash< TDat >::GetKeyIdByGSz(), TTimeNet::GetNIdByTm(), TTimeNENet::GetNIdByTm(), TSnap::GetNodesAtHops(), TExpHelp::GetObjHdNmV(), TSnap::GetOutDegCnt(), TSnap::GetSccSzCnt(), TSnap::GetSngVals(), TSnap::GetSngVec(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TSnap::GetTriadParticip(), TSnap::GetWccs(), TSnap::GetWccSzCnt(), TKroneckerLL::GradDescentConvergence(), TNetInfBs::GreedyOpt(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TNIBs::LabelBurstAutomaton(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TVec< TVal >::Merge(), TMAGFitBern::NextPermutation(), TNcpGraphsBase::PlotBestWhisker(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TSnap::PlotEigValDistr(), TSnap::PlotEigValRank(), TFfGGen::PlotFireSize(), TNcpGraphsBase::PlotNcpMin(), TLocClustStat::PlotNCPModul(), TNcpGraphsBase::PlotRewBestWhisker(), TNcpGraphsBase::PlotRewNcpMin(), TSnap::PlotSngValDistr(), TSnap::PlotSngValRank(), TSnap::PlotSngVec(), TGnuPlot::PlotValMomH(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TLocClustStat::Run(), TGStatVec::SaveTxt(), TNcpGraphsBase::SaveTxtNcpMin(), TKroneckerLL::SetBestDegPerm(), TKroneckerLL::SetDegPerm(), TSparseSVD::SimpleLanczos(), TCnCom::Sort(), TTuple< TVal, NVals >::Sort(), TBigNet< TNodeData, IsDir >::SortEdgeV(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), TGStat::TakeSpectral(), TUniChDb::TestWbFindNonIgnored(), TSparseRowMatrix::TSparseRowMatrix(), and TMAGFitBern::UnNormalizeAffMtxV().

                                    {
  QSort(0, Len()-1, Asc);
}

Here is the caller graph for this function:

template<class TVal>
template<class TCmp >
void TVec< TVal >::SortCmp ( const TCmp Cmp) [inline]

Definition at line 635 of file ds.h.

Referenced by TGStatVec::Sort().

                               {
    QSortCmp(BegI(), EndI(), Cmp);}

Here is the caller graph for this function:

template<class TVal>
void TVec< TVal >::Swap ( const int &  ValN1,
const int &  ValN2 
) [inline]

Definition at line 504 of file ds.h.

                                               {
    TVal Val=ValT[ValN1]; ValT[ValN1]=ValT[ValN2]; ValT[ValN2]=Val;}
template<class TVal>
static void TVec< TVal >::SwapI ( TIter  LVal,
TIter  RVal 
) [inline, static]

Definition at line 506 of file ds.h.

Referenced by TVec< THKeyDat >::BSortCmp(), and TVec< THKeyDat >::PartitionCmp().

                                           {
    TVal Val=*LVal; *LVal=*RVal; *RVal=Val;}

Here is the caller graph for this function:

template<class TVal>
const TVal& TVec< TVal >::TopHeap ( ) const [inline]

Definition at line 528 of file ds.h.

{ return ValT[0]; }                 // get largest element
template<class TVal >
void TVec< TVal >::Trunc ( const int &  _Vals = -1)

Definition at line 826 of file ds.h.

References IAssert.

                                      {
  IAssert(MxVals!=-1);
  IAssert((_Vals==-1)||(_Vals>=0));
  if ((_Vals!=-1)&&(_Vals>=Vals)){
    return;
  } else
  if (((_Vals==-1)&&(Vals==0))||(_Vals==0)){
    if (ValT!=NULL){delete[] ValT;}
    MxVals=Vals=0; ValT=NULL;
  } else {
    if (_Vals==-1){
      if (MxVals==Vals){return;} else {MxVals=Vals;}
    } else {
      MxVals=Vals=_Vals;
    }
    TVal* NewValT=new TVal[MxVals];
    IAssert(NewValT!=NULL);
    for (int ValN=0; ValN<Vals; ValN++){NewValT[ValN]=ValT[ValN];}
    delete[] ValT; ValT=NewValT;
  }
}
template<class TVal>
void TVec< TVal >::Union ( const TVec< TVal > &  ValV)

Definition at line 1175 of file ds.h.

                                            {
  TVec<TVal> UnionVec;
  Union(ValV, UnionVec);
  MoveFrom(UnionVec);
}
template<class TVal>
void TVec< TVal >::Union ( const TVec< TVal > &  ValV,
TVec< TVal > &  DstValV 
) const

Definition at line 1210 of file ds.h.

References TVec< TVal >::Add(), TVec< TVal >::Gen(), TInt::GetMx(), TVec< TVal >::GetVal(), and TVec< TVal >::Len().

                                                                        {
  DstValV.Gen(TInt::GetMx(Len(), ValV.Len()), 0);
  int ValN1=0; int ValN2=0;
  while ((ValN1<Len())&&(ValN2<ValV.Len())){
    const TVal& Val1=GetVal(ValN1);
    const TVal& Val2=ValV.GetVal(ValN2);
    if (Val1<Val2){DstValV.Add(Val1); ValN1++;}
    else if (Val1>Val2){DstValV.Add(Val2); ValN2++;}
    else {DstValV.Add(Val1); ValN1++; ValN2++;}
  }
  for (int RestValN1=ValN1; RestValN1<Len(); RestValN1++){
    DstValV.Add(GetVal(RestValN1));}
  for (int RestValN2=ValN2; RestValN2<ValV.Len(); RestValN2++){
    DstValV.Add(ValV.GetVal(RestValN2));}
}

Here is the call graph for this function:


Member Data Documentation


The documentation for this class was generated from the following files: