SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TVec< TVal, TSizeTy > Class Template Reference

Vector is a sequence TVal objects representing an array that can change in size. More...

#include <ds.h>

Collaboration diagram for TVec< TVal, TSizeTy >:

Public Types

typedef TVal * TIter
 Random access iterator to TVal. More...
 

Public Member Functions

 TVec ()
 
 TVec (const TVec< TVal, TSizeTy > &Vec)
 
 TVec (const TSizeTy &_Vals)
 Constructs a vector (an array) of length _Vals. More...
 
 TVec (const TSizeTy &_MxVals, const TSizeTy &_Vals)
 Constructs a vector (an array) of length _Vals, while reserving enough memory to store _MxVals elements. More...
 
 TVec (TVal *_ValT, const TSizeTy &_Vals)
 Constructs a vector of _Vals elements of memory array _ValT. More...
 
 ~TVec ()
 
 TVec (TSIn &SIn)
 
void LoadShM (TShMIn &ShMIn)
 Constructs the vector from a shared memory input. More...
 
template<typename TLoadShMElem >
void LoadShM (TShMIn &ShMIn, TLoadShMElem LoadFromShMFn)
 Constructs vector from shared memory input passing in functor to initialize elements. More...
 
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, TSizeTy > & operator= (const TVec< TVal, TSizeTy > &Vec)
 Assigns new contents to the vector, replacing its current content. More...
 
TVec< TVal, TSizeTy > & operator+ (const TVal &Val)
 Appends value Val to the vector. More...
 
bool operator== (const TVec< TVal, TSizeTy > &Vec) const
 Checks that the two vectors have the same contents. More...
 
bool operator< (const TVec< TVal, TSizeTy > &Vec) const
 Lexicographically compares two vectors. More...
 
const TVal & operator[] (const TSizeTy &ValN) const
 Returns a reference to the element at position ValN in the vector. More...
 
TVal & operator[] (const TSizeTy &ValN)
 Returns a reference to the element at position ValN in the vector. More...
 
TSizeTy GetMemUsed () const
 Returns the memory footprint (the number of bytes) of the vector. More...
 
TSizeTy GetMemSize () const
 Returns the memory size (the number of bytes) of a binary representation. More...
 
int GetPrimHashCd () const
 Returns primary hash code of the vector. Used by THash. More...
 
int GetSecHashCd () const
 Returns secondary hash code of the vector. Used by THash. More...
 
void Gen (const TSizeTy &_Vals)
 Constructs a vector (an array) of _Vals elements. More...
 
void Gen (const TSizeTy &_MxVals, const TSizeTy &_Vals)
 Constructs a vector (an array) of _Vals elements, while reserving enough memory for _MxVals elements. More...
 
void GenExt (TVal *_ValT, const TSizeTy &_Vals)
 Constructs a vector of _Vals elements of memory array _ValT. More...
 
bool IsExt () const
 Returns true if the vector was created using the GenExt(). More...
 
void Reserve (const TSizeTy &_MxVals)
 Reserves enough memory for the vector to store _MxVals elements. More...
 
void Reserve (const TSizeTy &_MxVals, const TSizeTy &_Vals)
 Reserves enough memory for the vector to store _MxVals elements and sets its length to _Vals. More...
 
void Clr (const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
 Clears the contents of the vector. More...
 
void Trunc (const TSizeTy &_Vals=-1)
 Truncates the vector's length and capacity to _Vals elements. More...
 
void Reduce (const TSizeTy &_Vals=-1)
 Reduces the vector's length to _Vals elements, which must be less than the current length. More...
 
void Pack ()
 Reduces vector capacity (frees memory) to match its size. More...
 
void MoveFrom (TVec< TVal, TSizeTy > &Vec)
 Takes over the data and the capacity from Vec. More...
 
void CopyUniqueFrom (TVec< TVal, TSizeTy > &Vec, TInt Offset, TInt Sz)
 Copy Sz values from Vec starting at Offset. More...
 
void Swap (TVec< TVal, TSizeTy > &Vec)
 Swaps the contents of the vector with Vec. More...
 
bool Empty () const
 Tests whether the vector is empty. More...
 
TSizeTy Len () const
 Returns the number of elements in the vector. More...
 
TSizeTy Reserved () const
 Returns the size of allocated storage capacity. More...
 
const TVal & Last () const
 Returns a reference to the last element of the vector. More...
 
TVal & Last ()
 Returns a reference to the last element of the vector. More...
 
TSizeTy LastValN () const
 Returns the position of the last element. More...
 
const TVal & LastLast () const
 Returns a reference to the one before last element of the vector. More...
 
TVal & LastLast ()
 Returns a reference to the one before last element of the vector. More...
 
const TVal & GetRndVal (TRnd &Rnd=TInt::Rnd) const
 Returns a reference to a random element in the vector. More...
 
TVal & GetRndVal (TRnd &Rnd=TInt::Rnd)
 Returns a reference to a random element in the vector. More...
 
TIter BegI () const
 Returns an iterator pointing to the first element in the vector. More...
 
TIter EndI () const
 Returns an iterator referring to the past-the-end element in the vector. More...
 
TIter GetI (const TSizeTy &ValN) const
 Returns an iterator an element at position ValN. More...
 
TSizeTy Add ()
 Adds a new element at the end of the vector, after its current last element. More...
 
TSizeTy Add (const TVal &Val)
 Adds a new element at the end of the vector, after its current last element. More...
 
TSizeTy Add (TVal &Val)
 
TSizeTy Add (const TVal &Val, const TSizeTy &ResizeLen)
 Adds element Val at the end of the vector. #TVec::Add2. More...
 
TSizeTy AddMP (const TVal &Val)
 Adds element Val at the end of the vector in a thread safe manner, returns the element index in the vector. TVec::AddMP. More...
 
TSizeTy MoveLastMP (const TVal &Val, int Inc)
 Reserves space after the current last element in a thread safe manner, returning the old vector size. More...
 
TSizeTy AddV (const TVec< TVal, TSizeTy > &ValV)
 Adds the elements of the vector ValV to the to end of the vector. More...
 
TSizeTy AddSorted (const TVal &Val, const bool &Asc=true, const TSizeTy &_MxVals=-1)
 Adds element Val to a sorted vector. More...
 
TSizeTy AddBackSorted (const TVal &Val, const bool &Asc)
 Adds element Val to a sorted vector. More...
 
TSizeTy AddMerged (const TVal &Val)
 Adds element Val to a sorted vector only if the element Val is not already in the vector. More...
 
TSizeTy AddVMerged (const TVec< TVal, TSizeTy > &ValV)
 Adds elements of ValV to a sorted vector only if a particular element is not already in the vector. More...
 
TSizeTy AddUnique (const TVal &Val)
 Adds element Val to a vector only if the element Val is not already in the vector. More...
 
const TVal & GetVal (const TSizeTy &ValN) const
 Returns a reference to the element at position ValN in the vector. More...
 
TVal & GetVal (const TSizeTy &ValN)
 Returns a reference to the element at position ValN in the vector. More...
 
void SetVal (const TSizeTy &ValN, const TVal &Val)
 Sets the value of element at position ValN to Val. More...
 
void GetSubValV (const TSizeTy &BValN, const TSizeTy &EValN, TVec< TVal, TSizeTy > &ValV) const
 Fills ValV with elements at positions BValN...EValN. More...
 
void Ins (const TSizeTy &ValN, const TVal &Val)
 Inserts new element Val before the element at position ValN. More...
 
void Del (const TSizeTy &ValN)
 Removes the element at position ValN. More...
 
void Del (const TSizeTy &MnValN, const TSizeTy &MxValN)
 Removes the elements at positions MnValN...MxValN. More...
 
void DelLast ()
 Removes the last element of the vector. More...
 
bool DelIfIn (const TVal &Val)
 Removes the first occurrence of element Val. More...
 
void DelAll (const TVal &Val)
 Removes all occurrences of element Val. More...
 
void PutAll (const TVal &Val)
 Sets all elements of the vector to value Val. More...
 
void Swap (const TSizeTy &ValN1, const TSizeTy &ValN2)
 Swaps elements at positions ValN1 and ValN2. More...
 
bool NextPerm ()
 Generates next permutation of the elements in the vector. More...
 
bool PrevPerm ()
 Generates previous permutation of the elements in the vector. More...
 
TSizeTy GetPivotValN (const TSizeTy &LValN, const TSizeTy &RValN) const
 Picks three random elements at positions LValN...RValN and returns the middle one. More...
 
void BSort (const TSizeTy &MnLValN, const TSizeTy &MxRValN, const bool &Asc)
 Bubble sorts the values between positions MnLValN...MxLValN. More...
 
void ISort (const TSizeTy &MnLValN, const TSizeTy &MxRValN, const bool &Asc)
 Insertion sorts the values between positions MnLValN...MxLValN. More...
 
TSizeTy Partition (const TSizeTy &MnLValN, const TSizeTy &MxRValN, const bool &Asc)
 Partitions the values between positions MnLValN...MxLValN. More...
 
void QSort (const TSizeTy &MnLValN, const TSizeTy &MxRValN, const bool &Asc)
 Quick sorts the values between positions MnLValN...MxLValN. More...
 
void Sort (const bool &Asc=true)
 Sorts the elements of the vector. More...
 
bool IsSorted (const bool &Asc=true) const
 Checks whether the vector is sorted in ascending (if Asc=true) or descending (if Asc=false) order. More...
 
void Shuffle (TRnd &Rnd)
 Randomly shuffles the elements of the vector. More...
 
void Reverse ()
 Reverses the order of the elements in the vector. More...
 
void Reverse (TSizeTy LValN, TSizeTy RValN)
 Reverses the order of elements between LValN...RValN. More...
 
void Merge ()
 Sorts the vector and only keeps a single element of each value. More...
 
template<class TCmp >
void SortCmp (const TCmp &Cmp)
 Sorts the elements of the vector using the comparator Cmp. More...
 
template<class TCmp >
bool IsSortedCmp (const TCmp &Cmp) const
 Checks whether the vector is sorted according to the comparator Cmp. More...
 
void Intrs (const TVec< TVal, TSizeTy > &ValV)
 Sets this vector to its intersection with ValV. Assumes the vectors are sorted! More...
 
void Union (const TVec< TVal, TSizeTy > &ValV)
 Sets this vector to its union with ValV. Assumes the vectors are sorted! More...
 
void Diff (const TVec< TVal, TSizeTy > &ValV)
 Subtracts ValV from this vector. Assumes the vectors are sorted! More...
 
void Intrs (const TVec< TVal, TSizeTy > &ValV, TVec< TVal, TSizeTy > &DstValV) const
 Sets DstValV to the intersection of this vector and ValV. Assumes the vectors are sorted! More...
 
void Union (const TVec< TVal, TSizeTy > &ValV, TVec< TVal, TSizeTy > &DstValV) const
 Sets DstValV to the union of this vector and ValV. Assumes the vectors are sorted! More...
 
void Diff (const TVec< TVal, TSizeTy > &ValV, TVec< TVal, TSizeTy > &DstValV) const
 Sets DstValV to the difference between this vector and ValV. Assumes the vectors are sorted! More...
 
TSizeTy IntrsLen (const TVec< TVal, TSizeTy > &ValV) const
 Returns the size of the intersection of vectors this and ValV. Assumes the vectors are sorted! More...
 
TSizeTy UnionLen (const TVec< TVal, TSizeTy > &ValV) const
 Returns the size of the union of vectors this and ValV. Assumes the vectors are sorted! More...
 
TSizeTy Count (const TVal &Val) const
 Counts the number of occurrences of Val in the vector. More...
 
TSizeTy SearchBin (const TVal &Val) const
 Returns the position of an element with value Val. More...
 
TSizeTy SearchBin (const TVal &Val, TSizeTy &InsValN) const
 Returns the position of an element with value Val. More...
 
TSizeTy SearchBinLeft (const TVal &Val, TSizeTy &InsValN) const
 Returns the position of an element with value Val. More...
 
TSizeTy SearchForw (const TVal &Val, const TSizeTy &BValN=0) const
 Returns the position of an element with value Val. More...
 
TSizeTy SearchBack (const TVal &Val) const
 Returns the position of an element with value Val. More...
 
TSizeTy SearchVForw (const TVec< TVal, TSizeTy > &ValV, const TSizeTy &BValN=0) const
 Returns the starting position of vector ValV. More...
 
bool IsIn (const TVal &Val) const
 Checks whether element Val is a member of the vector. More...
 
bool IsIn (const TVal &Val, TSizeTy &ValN) const
 Checks whether element Val is a member of the vector. More...
 
bool IsInBin (const TVal &Val) const
 Checks whether element Val is a member of the vector. More...
 
const TVal & GetDat (const TVal &Val) const
 Returns reference to the first occurrence of element Val. More...
 
TVal & GetAddDat (const TVal &Val)
 Returns reference to the first occurrence of element Val. More...
 
TSizeTy GetMxValN () const
 Returns the position of the largest element in the vector. More...
 

Static Public Member Functions

static void SwapI (TIter LVal, TIter RVal)
 Swaps the elements that iterators LVal and RVal point to. More...
 
template<class TCmp >
static TIter GetPivotValNCmp (const TIter &BI, const TIter &EI, const TCmp &Cmp)
 Picks three random elements at positions BI...EI and returns the middle one under the comparator Cmp. More...
 
template<class TCmp >
static TIter PartitionCmp (TIter BI, TIter EI, const TVal Pivot, const TCmp &Cmp)
 Partitions the values between positions BI...EI under the comparator Cmp. More...
 
template<class TCmp >
static void BSortCmp (TIter BI, TIter EI, const TCmp &Cmp)
 Bubble sorts the values between positions BI...EI under the comparator Cmp. More...
 
template<class TCmp >
static void ISortCmp (TIter BI, TIter EI, const TCmp &Cmp)
 Insertion sorts the values between positions BI...EI under the comparator Cmp. More...
 
template<class TCmp >
static void QSortCmp (TIter BI, TIter EI, const TCmp &Cmp)
 Quick sorts the values between positions BI...EI under the comparator Cmp. More...
 
static TVec< TVal, TSizeTy > GetV (const TVal &Val1)
 Returns a vector on element Val1. More...
 
static TVec< TVal, TSizeTy > GetV (const TVal &Val1, const TVal &Val2)
 Returns a vector on elements Val1, Val2. More...
 
static TVec< TVal, TSizeTy > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3)
 Returns a vector on elements Val1...Val3. More...
 
static TVec< TVal, TSizeTy > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4)
 Returns a vector on elements Val1...Val4. More...
 
static TVec< TVal, TSizeTy > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5)
 Returns a vector on elements Val1...Val5. More...
 
static TVec< TVal, TSizeTy > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5, const TVal &Val6)
 Returns a vector on elements Val1...Val6. More...
 
static TVec< TVal, TSizeTy > GetV (const TVal &Val1, const TVal &Val2, const TVal &Val3, const TVal &Val4, const TVal &Val5, const TVal &Val6, const TVal &Val7)
 Returns a vector on elements Val1...Val7. More...
 
static TVec< TVal, TSizeTy > 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)
 Returns a vector on elements Val1...Val8. More...
 
static TVec< TVal, TSizeTy > 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)
 Returns a vector on elements Val1...Val9. More...
 

Protected Member Functions

void Resize (const TSizeTy &_MxVals=-1)
 Resizes the vector so that it can store at least _MxVals. More...
 
TStr GetXOutOfBoundsErrMsg (const TSizeTy &ValN) const
 Constructs the out of bounds error message. More...
 

Protected Attributes

TSizeTy MxVals
 Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by the vector, and it won't free it at destruction. More...
 
TSizeTy Vals
 Vector length. Length is the number of elements stored in the vector. More...
 
TVal * ValT
 Pointer to the memory where the elements of the vector are stored. More...
 
bool IsShM
 

Detailed Description

template<class TVal, class TSizeTy = int>
class TVec< TVal, TSizeTy >

Vector is a sequence TVal objects representing an array that can change in size.

Internally, vectors use a dynamically allocated array to store their elements. This array may need to be reallocated in order to grow in size when new elements are inserted, which implies allocating a new array and moving all elements to it. This is a relatively expensive task in terms of processing time. Vectors may allocate some extra storage to accommodate for possible growth, and thus the container may have an actual capacity greater than the storage strictly needed to contain its elements (i.e., its size). The reallocations only happen at logarithmically growing intervals of size so that the insertion of individual elements at the end of the vector can be provided with amortized constant time complexity. Use TSizeTy=int for vectors of maximum size of 2 billion (2^31) and TSizeTy=int64 for vectors that can store up to 2^61 elements.

Definition at line 430 of file ds.h.

Member Typedef Documentation

template<class TVal, class TSizeTy = int>
typedef TVal* TVec< TVal, TSizeTy >::TIter

Random access iterator to TVal.

Definition at line 432 of file ds.h.

Constructor & Destructor Documentation

template<class TVal, class TSizeTy = int>
TVec< TVal, TSizeTy >::TVec ( )
inline

Definition at line 443 of file ds.h.

443 : MxVals(0), Vals(0), ValT(NULL), IsShM(false) {}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy>
TVec< TVal, TSizeTy >::TVec ( const TVec< TVal, TSizeTy > &  Vec)

Definition at line 922 of file ds.h.

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

922  {
923  MxVals=Vec.MxVals;
924  Vals=Vec.Vals;
925  if (MxVals==0) {ValT=NULL;} else {ValT=new TVal[MxVals];}
926  for (TSizeTy ValN=0; ValN<Vec.Vals; ValN++){ValT[ValN]=Vec.ValT[ValN];}
927  IsShM = false;
928 }
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
TVec< TVal, TSizeTy >::TVec ( const TSizeTy &  _Vals)
inlineexplicit

Constructs a vector (an array) of length _Vals.

Definition at line 446 of file ds.h.

446  {
447  IsShM = false;
448  IAssert(0<=_Vals); MxVals=Vals=_Vals;
449  if (_Vals==0){ValT=NULL;} else {ValT=new TVal[_Vals];}}
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
TVec< TVal, TSizeTy >::TVec ( const TSizeTy &  _MxVals,
const TSizeTy &  _Vals 
)
inline

Constructs a vector (an array) of length _Vals, while reserving enough memory to store _MxVals elements.

Definition at line 451 of file ds.h.

451  {
452  IsShM = false;
453  IAssert((0<=_Vals)&&(_Vals<=_MxVals)); MxVals=_MxVals; Vals=_Vals;
454  if (_MxVals==0){ValT=NULL;} else {ValT=new TVal[_MxVals];}}
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
TVec< TVal, TSizeTy >::TVec ( TVal *  _ValT,
const TSizeTy &  _Vals 
)
inlineexplicit

Constructs a vector of _Vals elements of memory array _ValT.

The data is not copied and the vector does not own the memory (i.e., the vector won't free the memory at destruction).

Definition at line 459 of file ds.h.

459  :
460  MxVals(-1), Vals(_Vals), ValT(_ValT), IsShM(false){}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
TVec< TVal, TSizeTy >::~TVec ( )
inline

Definition at line 461 of file ds.h.

461 {if ((ValT!=NULL) && (MxVals!=-1)) {delete[] ValT;}}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
TVec< TVal, TSizeTy >::TVec ( TSIn SIn)
inlineexplicit

Definition at line 462 of file ds.h.

462 : MxVals(0), Vals(0), ValT(NULL), IsShM(false) {Load(SIn);}
void Load(TSIn &SIn)
Definition: ds.h:946
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Member Function Documentation

template<class TVal, class TSizeTy = int>
TSizeTy TVec< TVal, TSizeTy >::Add ( )
inline

Adds a new element at the end of the vector, after its current last element.

This increases the vector size by one.

Definition at line 602 of file ds.h.

Referenced by TCnCom::Add(), TGStatVec::Add(), THeap< TTriple >::Add(), TVecElt< TVec< TDat > >::Add(), TUniTrie< TInt >::Add(), PVec< TVal >::Add(), TXmlLx::AddArg(), TAGMFit::AddBaseCmty(), TNetInfBs::AddCasc(), TGnuPlot::AddCmd(), TWChA::AddCStr(), TLocClustStat::AddCut(), TUniChDb::AddDecomposition(), TSimpleGraph::AddEdge(), TNGraphMP::AddEdgeUnchecked(), TUNGraph::AddEdgeUnchecked(), TNGraph::AddEdgeUnchecked(), TVecPool< TVal, TSizeTy >::AddEmptyV(), TGLib_OLD::TVecPool< TVal >::AddEmptyV(), TGnuPlot::AddErrBar(), TGnuPlot::AddExpFit(), THttpResp::AddFldVal(), TTableRow::AddFlt(), TCrossNet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatE(), TNEANet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatN(), TNEANet::AddFltAttrDatN(), TCrossNet::AddFltAttrE(), TNEANetMP::AddFltAttrE(), TNEANet::AddFltAttrE(), TNEANetMP::AddFltAttrN(), TNEANet::AddFltAttrN(), TTable::AddFltCol(), TTable::AddGraphAttribute(), TTable::AddGraphAttributeV(), THttpResp::AddHdFld(), TTable::AddIdColumn(), TTableRow::AddInt(), TCrossNet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatE(), TNEANet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatN(), TNEANet::AddIntAttrDatN(), TCrossNet::AddIntAttrE(), TNEANetMP::AddIntAttrE(), TNEANet::AddIntAttrE(), TNEANetMP::AddIntAttrN(), TNEANet::AddIntAttrN(), TTable::AddIntCol(), TModeNet::AddIntVAttrByHashN(), TModeNet::AddIntVAttrByVecN(), TNEANet::AddIntVAttrE(), TNEANet::AddIntVAttrN(), TTable::AddJointRow(), TStrHash< TDat, TStringPool, THashFunc >::AddKey(), TGnuPlot::AddLinFit(), TGnuPlot::AddLogFit(), TTree< TVal >::AddNode(), TTable::AddNodeAttributes(), TUndirFFire::AddNodes(), TGnuPlot::AddPlot(), TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TTable::AddRowI(), TTable::AddRowV(), TTable::AddSchemaCol(), TSnap::AddSelfEdges(), TempMotifCounter::AddStarEdgeData(), TempMotifCounter::AddStarEdges(), TTableRow::AddStr(), TBigStrPool::AddStr(), TTable::AddStrCol(), TTable::AddStrVal(), TempMotifCounter::AddTriadEdgeData(), TVecPool< TVal, TSizeTy >::AddV(), TGLib_OLD::TVecPool< TVal >::AddV(), ChibaNishizekiWeighter::AdjustLabels(), TTable::Aggregate(), TTable::AggregateCols(), TNEANet::AppendFltVAttrDatE(), TNEANet::AppendFltVAttrDatN(), TNEANet::AppendIntVAttrDatE(), TNEANet::AppendIntVAttrDatN(), TUniCaseFolding::AppendVector(), ProcessedGraph::assignWeights_dir(), TCrossNet::AttrNameEI(), TNEANetMP::AttrNameEI(), TNEANet::AttrNameEI(), TNEANetMP::AttrNameNI(), TNEANet::AttrNameNI(), TCrossNet::AttrValueEI(), TNEANetMP::AttrValueEI(), TNEANet::AttrValueEI(), TNEANetMP::AttrValueNI(), TNEANet::AttrValueNI(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), MotifCluster::BifanMotifAdjacency(), TBreathFS< PGraph >::BottomUpStep(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TUndirFFire::BurnGeoFire(), TSnap::TSnapDetail::CalcEffDiam(), TLogRegFit::CalcLogRegGradient(), TLogRegFit::CalcLogRegNewton(), TCliqueOverlap::CalculateOverlapMtx(), TSnap::CascFind(), TSnap::CascFindMP(), TSnap::CascGraphSource(), TSnap::CascGraphTime(), TKroneckerLL::ChainGelmapRubinPlot(), TTable::ClassifyAux(), ChibaNishizekiWeighter::CliqueEnum(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TSnap::CmtyEvolutionFileBatch(), TSnap::CmtyEvolutionFileBatchV(), TUniChDb::Compose(), MAPPR::computeProfile(), TAGMUtil::ConnectCmtyVV(), TTable::Count(), TempMotifCounter::Count3TEdge2Node(), TempMotifCounter::Count3TEdge3NodeStars(), TempMotifCounter::Count3TEdgeTriads(), ProcessedGraph::countClique(), ProcessedGraph::countDirTriadMotif(), TGnuPlot::CreatePlotFile(), TUniCodec::DecodeUtf16FromBytes(), TUniCodec::DecodeUtf16FromWords(), TUniCodec::DecodeUtf8(), TTable::Defrag(), TGStatVec::DelAfter(), TGStatVec::DelBefore(), TSnap::DelDegKNodes(), TGStatVec::DelSmallNodes(), TFile::DelWc(), TSnap::DelZeroDegNodes(), TTable::DenormalizeSchema(), TVec< TVal, TSizeTy >::Diff(), TSnap::TSnapDetail::TDelSelfEdges< PGraph, IsMultiGraph >::Do(), TSnap::TSnapDetail::TDelSelfEdges< PGraph, true >::Do(), TBreathFS< PGraph >::DoBfsHybrid(), TMAGFitBern::DoEMAlg(), TUniCodec::EncodeUtf16ToBytes(), TUniCodec::EncodeUtf16ToWords(), TUniCodec::EncodeUtf8(), TUniCodec::EncodeUtf8Str(), TSpecFunc::EntropyFracDim(), TSubGraphsEnum::EnumSubGraphs(), TCliqueOverlap::Expand(), TSpecFunc::ExpFit(), TUniChDb::ExtractStarters(), TTable::FillBucketsByInterval(), TTable::FillBucketsByWindow(), TCesnaUtil::FilterLowEntropy(), TSnap::FindAugV(), TLocClust::FindBestCut(), TCesna::FindComs(), TAGMUtil::FindComsByAGM(), TAGMFast::FindComsByCV(), TCoda::FindComsByCV(), TBiConVisitor::FinishNode(), TSccVisitor< PGraph, OnlyCount >::FinishNode(), TKronNoise::FlipEdgeNoise(), TCrossNet::FltAttrNameEI(), TNEANetMP::FltAttrNameEI(), TNEANet::FltAttrNameEI(), TNEANetMP::FltAttrNameNI(), TNEANet::FltAttrNameNI(), TCrossNet::FltAttrValueEI(), TNEANetMP::FltAttrValueEI(), TNEANet::FltAttrValueEI(), TNEANetMP::FltAttrValueNI(), TNEANet::FltAttrValueNI(), TNEANet::FltVAttrNameEI(), TNEANet::FltVAttrNameNI(), TNEANet::FltVAttrValueEI(), TNEANet::FltVAttrValueNI(), TUniCaseFolding::Fold(), TSubGraphsEnum::Gen2Graphs(), TAGM::GenAGM(), TBlobBs::GenBlockLenV(), TAGMUtil::GenCmtyVVFromPL(), TKronMtx::GenFastKronecker(), TFfGGen::GenFFGraphs(), TSnap::GenGeoPrefAttach(), TCesnaUtil::GenHoldOutPairs(), TAGMFastUtil::GenHoldOutPairs(), TAGMUtil::GenPLSeq(), TSnap::GenPrefAttach(), TSnap::GenRMat(), TSnap::GenRndDegK(), TSnap::GenRndPowerLaw(), TVec< TSparseGroup >::GetAddDat(), TCodaAnalyzer::GetAllCmtyVV(), TUnicode::GetAllCodecs(), TempMotifCounter::GetAllNeighbors(), TempMotifCounter::GetAllNodes(), TempMotifCounter::GetAllStaticTriangles(), TNEANet::GetAttrENames(), TNEANet::GetAttrNNames(), TNetInfBs::GetBestEdge(), TSnap::GetBetweennessCentr(), TSnap::GetBfsEffDiam(), TLocClustStat::GetBoltzmanCurveStat(), TNetInfBs::GetBound(), TUniChDb::GetCaseConverted(), TSnap::GetClustCf(), TAGMFast::GetCmtyVV(), TCoda::GetCmtyVV(), TAGMFit::GetCmtyVV(), TCesna::GetCmtyVV(), TCoda::GetCmtyVVUnSorted(), TCesna::GetCmtyVVUnSorted(), TVVec< TVal, TSizeTy >::GetCol(), TTable::GetCollidingRows(), THttpResp::GetCookieKeyValDmPathQuV(), TCliqueOverlap::GetCPMCommunities(), TLocClustStat::GetCurveStat(), THashMP< TKey, TDat, THashFunc >::GetDatV(), THash< TKey, TDat, THashFunc >::GetDatV(), TSparseHash< TKey, TDat, GroupSize >::GetDatV(), TStrHash< TDat, TStringPool, THashFunc >::GetDatV(), TSnap::GetDegCnt(), TSnap::GetDegSeqV(), TTable::GetDstNodeFltAttrV(), TTable::GetDstNodeIntAttrV(), TTable::GetDstNodeStrAttrV(), TSecTm::GetDtTmFromStr(), TTimeNENet::GetEdgeBuckets(), TTable::GetEdgeFltAttrV(), TTable::GetEdgeIntAttrV(), TTable::GetEdgeStrAttrV(), TTable::GetEdgeTable(), TTable::GetEdgeTablePN(), TTimeNENet::GetEdgeTmBuckets(), TTimeNENet::GetEIdByTm(), TNEANetMP::GetEIdV(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TNEANet::GetEIdV(), TSnap::GetEigVec(), TTable::GetFltNodePropertyTable(), TTable::GetFltRowIdxByVal(), TFFile::GetFNmV(), TGraphAnf< PGraph >::GetGraphAnf(), TTable::GetGraphsFromSequence(), TSnap::GetHitsMP(), TUrlLx::GetHPath(), TAttr::GetIdVSAttr(), TAttrPair::GetIdVSAttr(), TEnv::GetIfArgPrefixIntV(), TEnv::GetIfArgPrefixStrV(), TSnap::GetInDegCnt(), TTable::GetIntRowIdxByVal(), TSnap::GetInvParticipRat(), TSnap::GetKCoreEdges(), TSnap::GetKCoreNodes(), TGHash< TDat >::GetKeyIdByDat(), TGHash< TDat >::GetKeyIdByGSz(), THashMP< TKey, TDat, THashFunc >::GetKeyV(), THash< TKey, TDat, THashFunc >::GetKeyV(), TSparseHash< TKey, TDat, GroupSize >::GetKeyV(), TSparseSet< TKey, GroupSize >::GetKeyV(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyV(), THashSet< TKey, THashFunc >::GetKeyV(), TSnap::GetLen2Paths(), TBPGraph::GetLNIdV(), TILx::GetLnV(), TGraphEnumUtils::GetMinAndGraphIds(), TSnap::GetMxDegNId(), TSnap::GetMxInDegNId(), TSnap::GetMxOutDegNId(), TTimeNet::GetNIdByTm(), TTimeNENet::GetNIdByTm(), TCesnaUtil::GetNIdPhiV(), TAGMFastUtil::GetNIdPhiV(), GetNIdSorted(), TBigNet< TNodeData, IsDir >::GetNIdV(), TNGraphMP::GetNIdV(), TNodeNet< TNodeData >::GetNIdV(), TUNGraph::GetNIdV(), TNEANetMP::GetNIdV(), TNGraph::GetNIdV(), TNodeEDatNet< TNodeData, TEdgeData >::GetNIdV(), TNEGraph::GetNIdV(), TBPGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TNEANet::GetNIdV(), TUndirNet::GetNIdV(), TDirNet::GetNIdV(), GetNodeAlias(), TGraphAnf< PGraph >::GetNodeAnf(), TTimeNet::GetNodeBuckets(), TTimeNENet::GetNodeBuckets(), TTree< TVal >::GetNodeIdV(), TSnap::GetNodeInDegV(), TGHash< TDat >::GetNodeMap(), TAGMUtil::GetNodeMembership(), TSnap::GetNodeOutDegV(), TSnap::GetNodesAtHop(), TTable::GetNodeTable(), TSnap::GetNodeWcc(), TCoda::GetNonEdgePairScores(), GetNthFeature(), TSnap::GetOutDegCnt(), TWebPg::GetOutDescUrlStrKdV(), TWebPg::GetOutUrlV(), TCliqueOverlap::GetOverlapCliques(), TSnap::GetPageRank(), TSnap::GetPageRankMP(), TMMNet::GetPartitionRanges(), TTable::GetPartitionRanges(), TGraphEnumUtils::GetPermutations(), TTimeNENet::GetPrefAttach(), TSnap::GetRndESubGraph(), TBreathFS< PGraph >::GetRndPath(), TBPGraph::GetRNIdV(), TVVec< TVal, TSizeTy >::GetRow(), TAttr::GetSAttrV(), TAttrPair::GetSAttrV(), TTable::GetSchema(), TSnap::GetShortestDistances(), TSnap::GetShortestDistancesMP2(), TUniChDb::GetSimpleCaseConverted(), TSnap::GetSngVec(), TStr::GetSpaceStr(), TTable::GetSrcNodeFltAttrV(), TTable::GetSrcNodeIntAttrV(), TTable::GetSrcNodeStrAttrV(), TSsParserMP::GetStartPosV(), TStrHash< TDat, TStringPool, THashFunc >::GetStrIdV(), TTable::GetStrRowIdxByMap(), TMMNet::GetSubgraphByModeNet(), TVec< TVal, TSizeTy >::GetSubValV(), THtmlLx::GetTag(), TXmlTok::GetTagTokV(), TXmlDoc::GetTagTokV(), TXmlTok::GetTagValV(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), THtmlLx::GetTokStrV(), TSnap::GetTreeSig(), TTimeNENet::GetTriadEdges(), TSnap::GetTriads(), TSnap::GetTriads_v0(), TSnap::GetTriangleCnt(), TSnap::GetUniqueNbrV(), TVec< TSparseGroup >::GetV(), TGStatVec::GetValV(), TILx::GetVarBoolV(), TILx::GetVarFltV(), TPredicateNode::GetVariables(), TILx::GetVarIntV(), TEnv::GetVarNmV(), TEnv::GetVarNmValV(), TILx::GetVarStrPrV(), TILx::GetVarStrV(), TILx::GetVarStrVV(), TSnap::GetWccs(), TSnap::GetWeightedBetweennessCentr(), TSnap::GetWeightedPageRankMP(), TSnap::GetWeightedShortestPath(), TUStr::GetWordUStrV(), TMAGFitBern::GradApxAffMtx(), TKroneckerLL::GradDescent(), TKroneckerLL::GradDescentConvergence(), TNetInfBs::GreedyOpt(), TTable::GroupAux(), TLocClustStat::ImposeNCP(), TTable::IncrementNext(), TForestFire::InfectAll(), TForestFire::InfectRnd(), TSnap::Infomap(), TSnap::InfomapOnline(), TNetInfBs::Init(), TNIBs::Init(), TTmInfo::InitDayOfWeekNmV(), TTmInfo::InitMonthNmV(), TGHash< TDat >::InitPermutations(), InitUnigramTable(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TMaxPriorityQueue< TVal >::Insert(), TCrossNet::IntAttrNameEI(), TNEANetMP::IntAttrNameEI(), TNEANet::IntAttrNameEI(), TNEANetMP::IntAttrNameNI(), TNEANet::IntAttrNameNI(), TCrossNet::IntAttrValueEI(), TNEANetMP::IntAttrValueEI(), TNEANet::IntAttrValueEI(), TNEANetMP::IntAttrValueNI(), TNEANet::IntAttrValueNI(), TTable::Intersection(), TVec< TVal, TSizeTy >::Intrs(), TNEANet::IntVAttrNameEI(), TNEANet::IntVAttrNameNI(), TNEANet::IntVAttrValueEI(), TNEANet::IntVAttrValueNI(), TTable::IsNextK(), TStr::IsWcMatch(), KNNJaccard(), KNNJaccardParallel(), TNIBs::LabelBurstAutomaton(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TTimeNet::LoadArxiv(), TAGMUtil::LoadCmtyVV(), TKeyDatFl< TKey, TDat, THashFunc >::LoadDatV(), TSnap::LoadDyNetGraphV(), TInt::LoadFrugalIntV(), TKeyDatFl< TKey, TDat, THashFunc >::LoadKeyV(), TLAMisc::LoadMatlabTFltVV(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TTimeNet::LoadPatents(), TBigStrPool::LoadPoolShM(), TTable::LoadSS(), TTable::LoadSSPar(), TGnuPlot::LoadTs(), TMAGNodeBern::LoadTxt(), TMAGNodeBeta::LoadTxt(), TXmlDoc::LoadTxt(), TUniChDb::LoadTxt_ProcessDecomposition(), TSs::LoadTxtFldV(), TSpecFunc::LogFit(), TMAGFitBern::MakeCCDF(), TGUtil::MakeExpBins(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TSnap::MakeUnDir(), TSnap::TSnapDetail::MapEquationNew2Modules(), TSnap::MapHits(), TCluster::MCMC(), McMcGetAvgJ(), TTable::Merge(), MergeNbrs(), TSnap::MergeNbrs(), TTable::Minus(), TAGMFast::MLEGradAscent(), TCoda::MLEGradAscent(), TCesna::MLEGradAscent(), TAGMFit::MLEGradAscentGivenCAG(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TLogRegFit::MLEGradient(), TAGMFast::MLENewton(), TCodaAnalyzer::Net2ModeCommunities(), TWebPg::New(), TSsParserMP::Next(), TSsParser::Next(), TSsParserMP::NextFromIndex(), TSsParser::NextSlow(), MotifCluster::NFiedlerVector(), node2vec(), TTable::NormalizeColNameV(), TVec< TSparseGroup >::operator+(), TWChA::operator+=(), anonymous_namespace{unicode.cpp}::TVectorBuilder2::operator,(), TTable::Order(), 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::PlotValRank(), TGnuPlot::PlotValV(), TLocClust::PlotVolDistr(), TSpecFunc::PowerFit(), PreprocessNode(), PreprocessTransitionProbs(), TSparseSVD::Project(), TTable::Project(), TSnapQueue< int >::Push(), TSStack< TInt >::Push(), TQQueue< TInt >::Push(), THtmlLx::PutArg(), TMBlobBs::PutBlob(), TWChA::PutCStr(), TTable::QSortPar(), TTable::ReadFltCol(), TTable::ReadIntCol(), TTable::ReadStrCol(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TKronNoise::RemoveEdgeNoise(), TTable::RequestIndexFlt(), TTable::RequestIndexInt(), TTable::RequestIndexStrMap(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyNID(), TLocClustStat::Run(), TKroneckerLL::RunEStep(), TKroneckerLL::RunKronEM(), TAGMFit::RunMCMC(), THtmlDoc::SaveHtmlToXml(), TNetInfBs::SaveObjInfo(), TMAGNodeSimple::SaveTxt(), TMAGNodeBern::SaveTxt(), TMAGNodeBeta::SaveTxt(), TLocClustStat::SaveTxtInfo(), TNcpGraphsBase::SaveTxtNcpMin(), TTable::Select(), TTable::SelectAtomic(), TTable::SelectAtomicConst(), TTable::SelfSimJoinPerGroup(), MotifCluster::SemicliqueMotifAdjacency(), TTable::SetCommonNodeAttrs(), TKroneckerLL::SetDegPerm(), TKroneckerLL::SetGraph(), TKroneckerLL::SetOrderPerm(), TKroneckerLL::SetRandomEdges(), TTimeNENet::SetRndEdgeTimes(), TKroneckerLL::SetRndPerm(), TQQueue< TInt >::Shuffle(), TTable::SimJoin(), TSparseSVD::SimpleLanczos(), SimulateWalk(), TTuple< TVal, NVals >::Sort(), TSparseOps< TKey, TDat >::SparseMerge(), MotifCluster::SpectralCut(), TTable::SpliceByGroup(), TStrUtil::SplitLines(), TStr::SplitOnAllAnyCh(), TStr::SplitOnAllCh(), TStrUtil::SplitOnCh(), TStr::SplitOnNonAlNum(), TStr::SplitOnStr(), TStr::SplitOnWs(), TStrUtil::SplitSentences(), TStrUtil::SplitWords(), TTable::StoreFltCol(), TTable::StoreGroupCol(), TTable::StoreIntCol(), TTable::StoreStrCol(), TCrossNet::StrAttrNameEI(), TNEANetMP::StrAttrNameEI(), TNEANet::StrAttrNameEI(), TNEANetMP::StrAttrNameNI(), TNEANet::StrAttrNameNI(), TCrossNet::StrAttrValueEI(), TNEANetMP::StrAttrValueEI(), TNEANet::StrAttrValueEI(), TNEANetMP::StrAttrValueNI(), TNEANet::StrAttrValueNI(), SummarizeConnectedComponents(), TLocClust::SupportSweep(), MAPPR::sweepAPPR(), SymeigsSmallest(), TGStat::TakeConnComp(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), TGStat::TakeSpectral(), TGStat::TakeTriadPart(), TBigStrPool::TBigStrPool(), TCodaAnalyzer::TCodaAnalyzer(), TempMotifCounter::TempMotifCounter(), 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(), TFFile::TFFile(), TGraphAttributes::TGraphAttributes(), THtmlDoc::THtmlDoc(), THtmlHldV::THtmlHldV(), TTimeNENet::TimeGrowth(), TMBlobBs::TMBlobBs(), TNcpGraphsBase::TNcpGraphsBase(), TSnap::ToGraphMP(), TMMNet::ToNetworkMP(), TSnap::ToNetworkMP(), TSnap::ToNetworkMP2(), TBreathFS< PGraph >::TopDownStep(), TLAMisc::ToSpVec(), T8BitCodec< TEncoding_ISO8859_3 >::ToUnicode(), TPreproc::TPreproc(), TSnap::TSnapDetail::transitiveTransform(), MotifCluster::TriangleMotifAdjacency(), TSparseRowMatrix::TSparseRowMatrix(), TVecPool< TVal, TSizeTy >::TVecPool(), TGLib_OLD::TVecPool< TVal >::TVecPool(), anonymous_namespace{unicode.cpp}::TVectorBuilder2::TVectorBuilder2(), TVec< TVal, TSizeTy >::Union(), TTable::Union(), TTable::UnionAll(), TTable::Unique(), TMAGFitBern::UpdateApxPhiMI(), TNIBs::UpdateDiff(), TTable::UpdateGrouping(), TMAGFitBern::UpdatePhi(), TMAGFitBern::UpdatePhiMI(), TTable::UpdateTableForNewRow(), MotifCluster::WedgeMotifAdjacency(), and TUniCodec::WordsToBytes().

602  { AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
603  if (Vals==MxVals){Resize();} return Vals++;}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define AssertR(Cond, Reason)
Definition: bd.h:258
void Resize(const TSizeTy &_MxVals=-1)
Resizes the vector so that it can store at least _MxVals.
Definition: ds.h:877
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TSizeTy TVec< TVal, TSizeTy >::Add ( const TVal &  Val)
inline

Adds a new element at the end of the vector, after its current last element.

The content of Val is copied to the new element.

Definition at line 608 of file ds.h.

608  { AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
609  if (Vals==MxVals){Resize();} ValT[Vals]=Val; return Vals++;}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define AssertR(Cond, Reason)
Definition: bd.h:258
void Resize(const TSizeTy &_MxVals=-1)
Resizes the vector so that it can store at least _MxVals.
Definition: ds.h:877
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
TSizeTy TVec< TVal, TSizeTy >::Add ( TVal &  Val)
inline

Definition at line 610 of file ds.h.

610  { AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
611  if (Vals==MxVals){Resize();} ValT[Vals]=Val; return Vals++;}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define AssertR(Cond, Reason)
Definition: bd.h:258
void Resize(const TSizeTy &_MxVals=-1)
Resizes the vector so that it can store at least _MxVals.
Definition: ds.h:877
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
TSizeTy TVec< TVal, TSizeTy >::Add ( const TVal &  Val,
const TSizeTy &  ResizeLen 
)
inline

Adds element Val at the end of the vector. #TVec::Add2.

Definition at line 613 of file ds.h.

613  { AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
614  if (Vals==MxVals){Resize(MxVals+ResizeLen);} ValT[Vals]=Val; return Vals++;}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define AssertR(Cond, Reason)
Definition: bd.h:258
void Resize(const TSizeTy &_MxVals=-1)
Resizes the vector so that it can store at least _MxVals.
Definition: ds.h:877
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy >
TSizeTy TVec< TVal, TSizeTy >::AddBackSorted ( const TVal &  Val,
const bool &  Asc 
)

Adds element Val to a sorted vector.

Parameters
AscAdds the element so that ascending (if true) or descending (if false) order is maintained.

Definition at line 1133 of file ds.h.

References AssertR, and EAssertR.

1133  {
1134  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1135  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1136  Add();
1137  TSizeTy ValN=Vals-2;
1138  while ((ValN>=0)&&((Asc&&(Val<ValT[ValN]))||(!Asc&&(Val>ValT[ValN])))){
1139  ValT[ValN+1]=ValT[ValN]; ValN--;}
1140  ValT[ValN+1]=Val;
1141  return ValN+1;
1142 }
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy >
TSizeTy TVec< TVal, TSizeTy >::AddMerged ( const TVal &  Val)

Adds element Val to a sorted vector only if the element Val is not already in the vector.

Uses binary search to check whether an element is already in the vector.

Definition at line 1145 of file ds.h.

References AssertR, and EAssertR.

1145  {
1146  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1147  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1148  TSizeTy ValN=SearchBin(Val);
1149  if (ValN==-1){return AddSorted(Val);}
1150  else {GetVal(ValN)=Val; return -1;}
1151 }
TSizeTy AddSorted(const TVal &Val, const bool &Asc=true, const TSizeTy &_MxVals=-1)
Adds element Val to a sorted vector.
Definition: ds.h:1117
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1519
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
template<class TVal, class TSizeTy = int>
TSizeTy TVec< TVal, TSizeTy >::AddMP ( const TVal &  Val)
inline

Adds element Val at the end of the vector in a thread safe manner, returns the element index in the vector. TVec::AddMP.

Definition at line 617 of file ds.h.

Referenced by TSnap::GetShortestDistancesMP2().

617  { const int Idx = __sync_fetch_and_add(&Vals, 1);
618  ValT[Idx]=Val; return Idx;}
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

template<class TVal, class TSizeTy>
TSizeTy TVec< TVal, TSizeTy >::AddSorted ( const TVal &  Val,
const bool &  Asc = true,
const TSizeTy &  _MxVals = -1 
)

Adds element Val to a sorted vector.

Parameters
AscAdds the element so that ascending (if true) or descending (if false) order is maintained.

Definition at line 1117 of file ds.h.

References AssertR, EAssertR, and Swap().

Referenced by TNGraphMP::AddEdge(), TUNGraph::AddEdge(), TNEANetMP::AddEdge(), TNGraph::AddEdge(), TNEGraph::AddEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge(), TNEANet::AddEdge(), TUNGraph::AddEdge2(), TNGraph::AddEdge2(), and TUNGraph::AddNode().

1117  {
1118  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1119  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1120  TSizeTy ValN=Add(Val);
1121  if (Asc){
1122  while ((ValN>0)&&(ValT[ValN]<ValT[ValN-1])){
1123  Swap(ValN, ValN-1); ValN--;}
1124  } else {
1125  while ((ValN>0)&&(ValT[ValN]>ValT[ValN-1])){
1126  Swap(ValN, ValN-1); ValN--;}
1127  }
1128  if ((_MxVals!=-1)&&(Len()>_MxVals)){Del(_MxVals, Len()-1);}
1129  return ValN;
1130 }
void Del(const TSizeTy &ValN)
Removes the element at position ValN.
Definition: ds.h:1189
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
void Swap(TVec< TVal, TSizeTy > &Vec)
Swaps the contents of the vector with Vec.
Definition: ds.h:1101
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the call graph for this function:

Here is the caller graph for this function:

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

Adds element Val to a vector only if the element Val is not already in the vector.

Does not assume the vector to be sorted and thus uses linear search to check whether Val is already in the vector.

Definition at line 1162 of file ds.h.

References AssertR.

Referenced by THitInfo::AddKeyword().

1162  {
1163  AssertR(MxVals!=-1 || IsShM, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1164  TSizeTy ValN=SearchForw(Val);
1165  if (ValN==-1){return Add(Val);}
1166  else {GetVal(ValN)=Val; return -1;}
1167 }
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy SearchForw(const TVal &Val, const TSizeTy &BValN=0) const
Returns the position of an element with value Val.
Definition: ds.h:1552
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the caller graph for this function:

template<class TVal, class TSizeTy>
TSizeTy TVec< TVal, TSizeTy >::AddV ( const TVec< TVal, TSizeTy > &  ValV)

Adds the elements of the vector ValV to the to end of the vector.

Definition at line 1110 of file ds.h.

References AssertR, and TVec< TVal, TSizeTy >::Vals.

Referenced by TTable::AddTable(), TUniChDb::LoadTxt_ProcessDecomposition(), TUStr::operator+=(), TWChA::operator+=(), TTimeNet::PlotCCfOverTm(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TTimeNet::PlotMedianDegOverTm(), TTimeNet::PlotMissingPast(), TUniChDb::TestFindNextWordOrSentenceBoundary(), TTimeNet::TimeGrowth(), TTimeNENet::TimeGrowth(), and TMMNet::ToNetworkMP().

1110  {
1111  AssertR(MxVals!=-1 || IsShM, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1112  for (TSizeTy ValN=0; ValN<ValV.Vals; ValN++){Add(ValV[ValN]);}
1113  return Len();
1114 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the caller graph for this function:

template<class TVal, class TSizeTy>
TSizeTy TVec< TVal, TSizeTy >::AddVMerged ( const TVec< TVal, TSizeTy > &  ValV)

Adds elements of ValV to a sorted vector only if a particular element is not already in the vector.

Uses binary search to check whether an element is already in the vector.

Definition at line 1154 of file ds.h.

References AssertR, EAssertR, and TVec< TVal, TSizeTy >::Vals.

1154  {
1155  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1156  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1157  for (TSizeTy ValN=0; ValN<ValV.Vals; ValN++){AddMerged(ValV[ValN]);}
1158  return Len();
1159 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy AddMerged(const TVal &Val)
Adds element Val to a sorted vector only if the element Val is not already in the vector...
Definition: ds.h:1145
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
template<class TVal, class TSizeTy = int>
TIter TVec< TVal, TSizeTy >::BegI ( ) const
inline

Returns an iterator pointing to the first element in the vector.

Definition at line 593 of file ds.h.

Referenced by TPackVec< TVal >::AddV(), TVecPool< TVal, TSizeTy >::AddV(), TGLib_OLD::TVecPool< TVal >::AddV(), ProcessedGraph::assignWeights_undir(), TGraphAnf< PGraph >::AvgLstZero(), TCrossNet::BegEAFltI(), TNEANetMP::BegEAFltI(), TNEANet::BegEAFltI(), TNEANet::BegEAFltVI(), TCrossNet::BegEAIntI(), TNEANetMP::BegEAIntI(), TNEANet::BegEAIntI(), TNEANet::BegEAIntVI(), TCrossNet::BegEAStrI(), TNEANetMP::BegEAStrI(), TNEANet::BegEAStrI(), THashMP< TInt, TEdge >::BegI(), THash< TPair, THash >::BegI(), TSparseTable< TKey, GroupSize >::BegI(), THashSet< TInt >::BegI(), TNEANetMP::BegNAFltI(), TNEANet::BegNAFltI(), TNEANet::BegNAFltVI(), TNEANetMP::BegNAIntI(), TNEANet::BegNAIntI(), TNEANet::BegNAIntVI(), TNEANetMP::BegNAStrI(), TNEANet::BegNAStrI(), TTable::BuildGraph(), TSnap::CascFind(), TSnap::CascFindMP(), TSparseTable< TKey, GroupSize >::EndI(), TGraphAnf< PGraph >::GetGraphAnf(), TSparseTable< TKey, GroupSize >::GetI(), TGraphAnf< PGraph >::GetNodeAnf(), TGraphAnf< PGraph >::InitAnfBits(), TVec< TSparseGroup >::IsSortedCmp(), TSparseColMatrix::PMultiply(), TSparseColMatrix::PMultiplyT(), TSnapQueue< int >::Push(), TVecPool< TInt >::PutV(), TGLib_OLD::TVecPool< TVal >::PutV(), TBigNet< TNodeData, IsDir >::SetInNIdV(), TBigNet< TNodeData, IsDir >::SetOutNIdV(), TVec< TSparseGroup >::SortCmp(), Sweep(), TBreathFS< PGraph >::TopDownStep(), TSubGraphEnum< TGraphCounter >::TSVec::TSVec(), and TGraphAnf< PGraph >::Union().

593 {return ValT;}
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

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

Bubble sorts the values between positions MnLValN...MxLValN.

Parameters
AscSorts the elements in ascending (if true) or descending (if false) order.

Definition at line 1235 of file ds.h.

References Swap().

1235  {
1236  for (TSizeTy ValN1=MnLValN; ValN1<=MxRValN; ValN1++){
1237  for (TSizeTy ValN2=MxRValN; ValN2>ValN1; ValN2--){
1238  if (Asc){
1239  if (ValT[ValN2]<ValT[ValN2-1]){Swap(ValN2, ValN2-1);}
1240  } else {
1241  if (ValT[ValN2]>ValT[ValN2-1]){Swap(ValN2, ValN2-1);}
1242  }
1243  }
1244  }
1245 }
void Swap(TVec< TVal, TSizeTy > &Vec)
Swaps the contents of the vector with Vec.
Definition: ds.h:1101
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the call graph for this function:

template<class TVal, class TSizeTy = int>
template<class TCmp >
static void TVec< TVal, TSizeTy >::BSortCmp ( TIter  BI,
TIter  EI,
const TCmp Cmp 
)
inlinestatic

Bubble sorts the values between positions BI...EI under the comparator Cmp.

Definition at line 750 of file ds.h.

750  {
751  for (TIter i = BI; i != EI; ++i) {
752  for (TIter j = EI-1; j != i; --j) {
753  if (Cmp(*j, *(j-1))) { SwapI(j, j-1); } } } }
TVal * TIter
Random access iterator to TVal.
Definition: ds.h:432
bool Cmp(const int &RelOp, const TRec &Rec1, const TRec &Rec2)
Definition: bd.h:426
static void SwapI(TIter LVal, TIter RVal)
Swaps the elements that iterators LVal and RVal point to.
Definition: ds.h:677
template<class TVal , class TSizeTy>
void TVec< TVal, TSizeTy >::Clr ( const bool &  DoDel = true,
const TSizeTy &  NoDelLim = -1 
)

Clears the contents of the vector.

Vector's memory gets deallocated only if DoDel=true or if vector's capacity is greater than NoDelLim.

Definition at line 1022 of file ds.h.

References IAssertR.

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(), TSnapQueue< int >::Clr(), TCrossNet::Clr(), TNEANetMP::Clr(), TUniTrie< TInt >::Clr(), TUniChDb::Clr(), TVecPool< TInt >::Clr(), TGLib_OLD::TVecPool< TVal >::Clr(), TVVec< TFlt >::Clr(), TVVVec< TVal, TSizeTy >::Clr(), TTree< TVal >::Clr(), TSStack< TInt >::Clr(), TQQueue< TInt >::Clr(), TNEANet::Clr(), TXmlLx::ClrArgV(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TSnap::CommunityGirvanNewman(), TUniChDb::Compose(), TNEANet::ConvertToSparse(), TUniCodec::DecodeUtf16FromBytes(), TUniCodec::DecodeUtf16FromWords(), TUniCodec::DecodeUtf8(), TUniChDb::Decompose(), TUniChDb::DecomposeAndCompose(), TMom::Def(), THitInfo::DelKeywords(), TVec< TVal, TSizeTy >::Diff(), TBreathFS< PGraph >::DoBfsHybrid(), TSpecFunc::EntropyFracDim(), TSubGraphsEnum::EnumSubGraphs(), TUniChDb::ExtractStarters(), TLocClust::FindBestCut(), TQQueue< TInt >::Gen(), TBlobBs::GenBlockLenV(), TAGMUtil::GenCmtyVVFromPL(), TTable::GenerateColTypeMap(), TSnap::GenGeoPrefAttach(), TSnap::Get1CnCom(), TSnap::Get1CnComSzCnt(), TUnicode::GetAllCodecs(), TempMotifCounter::GetAllStaticTriangles(), TUniChDb::GetCaseConverted(), TSnap::GetClustCf(), TSnap::GetCmnNbrs(), THttpResp::GetCookieKeyValDmPathQuV(), TCliqueOverlap::GetCPMCommunities(), TLocClustStat::GetCurveStat(), THttpResp::GetFldValV(), TFFile::GetFNmV(), TGraphAnf< PGraph >::GetGraphAnf(), TSnap::GetInvParticipRat(), TSnap::GetKCoreEdges(), TSnap::GetKCoreNodes(), 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(), TWebPg::GetOutDescUrlStrKdV(), TWebPg::GetOutUrlV(), TBreathFS< PGraph >::GetRndPath(), TUniChDb::GetSimpleCaseConverted(), TSnap::GetSngVec(), THtmlLx::GetSym(), TXmlTok::GetTagTokV(), TXmlDoc::GetTagTokV(), THtmlLx::GetTokStrV(), TTimeNENet::GetTriadEdges(), TSnap::GetTriads(), TSnap::GetTriads_v0(), TVecPool< TInt >::GetV(), TGLib_OLD::TVecPool< TVal >::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(), ChibaNishizekiWeighter::Initialize(), TTable::InitRowIdBuckets(), TVec< TVal, TSizeTy >::Intrs(), KNNJaccard(), KNNJaccardParallel(), TInt::LoadFrugalIntV(), TLAMisc::LoadMatlabTFltVV(), TGnuPlot::LoadTs(), TXmlDoc::LoadTxt(), TSs::LoadTxtFldV(), TGUtil::MakeExpBins(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TSsParserMP::Next(), TSsParser::Next(), TSsParserMP::NextFromIndex(), TSsParser::NextSlow(), TUniChDb::TUcdFileReader::ParseCodePointList(), TSnapQueue< int >::Pop(), TQQueue< TInt >::Pop(), TTable::QSortPar(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TSnap::ReebRefine(), TKroneckerLL::RestoreGraph(), TLocClustStat::Run(), TTable::SelfSimJoinPerGroup(), TSparseOps< TKey, TDat >::SparseMerge(), TStrUtil::SplitLines(), TStr::SplitOnAllAnyCh(), TStr::SplitOnAllCh(), TStrUtil::SplitOnCh(), TStr::SplitOnNonAlNum(), TStr::SplitOnStr(), TStr::SplitOnWs(), TStrUtil::SplitSentences(), TStrUtil::SplitWords(), TLocClust::SupportSweep(), MAPPR::sweepAPPR(), TUniCodec::TestUtf16(), TUniCodec::TestUtf8(), THtmlHldV::THtmlHldV(), TTimeNENet::TimeGrowth(), TSnap::ToGraphMP3(), TLAMisc::ToSpVec(), T8BitCodec< TEncoding_ISO8859_3 >::ToUnicode(), and TUniCodec::WordsToBytes().

1022  {
1023  if ((DoDel)||((!DoDel)&&(NoDelLim!=-1)&&(MxVals>NoDelLim))){
1024  if ((ValT!=NULL)&&(MxVals!=-1)){delete[] ValT;}
1025  MxVals=Vals=0; ValT=NULL;
1026  } else {
1027  IAssertR(MxVals!=-1 || IsShM, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1028  Vals=0;
1029  }
1030 }
#define IAssertR(Cond, Reason)
Definition: bd.h:265
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

template<class TVal, class TSizeTy>
void TVec< TVal, TSizeTy >::CopyUniqueFrom ( TVec< TVal, TSizeTy > &  Vec,
TInt  Offset,
TInt  Sz 
)

Copy Sz values from Vec starting at Offset.

Definition at line 1082 of file ds.h.

References EAssertR, and TVec< TVal, TSizeTy >::ValT.

Referenced by TSnap::ToGraphMP(), TSnap::ToNetworkMP(), and TSnap::ToNetworkMP2().

1082  {
1083  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1084  if (this!=&Vec){
1085  if (ValT!=NULL && MxVals!=-1 && MxVals < Sz){
1086  delete[] ValT;
1087  ValT=new TVal[Sz];
1088  }
1089  if (Sz == 0) { Vals = 0; return; }
1090  ValT[0] = Vec.ValT[Offset];
1091  Vals = 1;
1092  for (TSizeTy ValN=1; ValN<Sz; ValN++){
1093  if (ValT[Vals-1] != Vec.ValT[Offset+ValN]) {
1094  ValT[Vals++] = Vec.ValT[Offset+ValN];
1095  }
1096  }
1097  }
1098 }
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

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

Counts the number of occurrences of Val in the vector.

Definition at line 1511 of file ds.h.

1511  {
1512  TSizeTy Count = 0;
1513  for (TSizeTy i = 0; i < Len(); i++){
1514  if (Val == ValT[i]){Count++;}}
1515  return Count;
1516 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
TSizeTy Count(const TVal &Val) const
Counts the number of occurrences of Val in the vector.
Definition: ds.h:1511
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal , class TSizeTy>
void TVec< TVal, TSizeTy >::Del ( const TSizeTy &  ValN)

Removes the element at position ValN.

Definition at line 1189 of file ds.h.

References Assert, AssertR, and EAssertR.

Referenced by TGStatVec::Del(), TNGraphMP::DelEdge(), TUNGraph::DelEdge(), TNGraph::DelEdge(), TBPGraph::DelEdge(), TUndirNet::DelEdge(), TDirNet::DelEdge(), TVec< TSparseGroup >::DelLast(), TNGraphMP::DelNode(), TNodeNet< TNodeData >::DelNode(), TUNGraph::DelNode(), TNGraph::DelNode(), TNodeEDatNet< TNodeData, TEdgeData >::DelNode(), TBPGraph::DelNode(), TUndirNet::DelNode(), TDirNet::DelNode(), TSnap::findMinimum(), TSnap::GenGeoPrefAttach(), TSnap::Get1CnCom(), TSnap::Get1CnComSzCnt(), TSvd::GetCfV(), TSnap::GetRndSubGraph(), TTable::ProjectInPlace(), TSnapQueue< int >::Push(), TQQueue< TInt >::Push(), TKroneckerLL::RestoreGraph(), TSvd::Svd(), and TSvd::Svd1Based().

1189  {
1190  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1191  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1192  Assert((0<=ValN)&&(ValN<Vals));
1193  for (TSizeTy MValN=ValN+1; MValN<Vals; MValN++){
1194  ValT[MValN-1]=ValT[MValN];}
1195  ValT[--Vals]=TVal();
1196 }
#define Assert(Cond)
Definition: bd.h:251
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

template<class TVal , class TSizeTy>
void TVec< TVal, TSizeTy >::Del ( const TSizeTy &  MnValN,
const TSizeTy &  MxValN 
)

Removes the elements at positions MnValN...MxValN.

Definition at line 1199 of file ds.h.

References Assert, AssertR, and EAssertR.

1199  {
1200  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1201  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1202  Assert((0<=MnValN)&&(MnValN<Vals)&&(0<=MxValN)&&(MxValN<Vals));
1203  Assert(MnValN<=MxValN);
1204  for (TSizeTy ValN=MxValN+1; ValN<Vals; ValN++){
1205  ValT[MnValN+ValN-MxValN-1]=ValT[ValN];}
1206  for (TSizeTy ValN=Vals-MxValN+MnValN-1; ValN<Vals; ValN++){
1207  ValT[ValN]=TVal();}
1208  Vals-=MxValN-MnValN+1;
1209 }
#define Assert(Cond)
Definition: bd.h:251
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy >
void TVec< TVal, TSizeTy >::DelAll ( const TVal &  Val)

Removes all occurrences of element Val.

Definition at line 1221 of file ds.h.

References AssertR, and EAssertR.

1221  {
1222  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1223  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1224  TSizeTy ValN;
1225  while ((ValN=SearchForw(Val))!=-1){Del(ValN);}
1226 }
void Del(const TSizeTy &ValN)
Removes the element at position ValN.
Definition: ds.h:1189
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy SearchForw(const TVal &Val, const TSizeTy &BValN=0) const
Returns the position of an element with value Val.
Definition: ds.h:1552
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
template<class TVal, class TSizeTy >
bool TVec< TVal, TSizeTy >::DelIfIn ( const TVal &  Val)

Removes the first occurrence of element Val.

Definition at line 1212 of file ds.h.

References AssertR, and EAssertR.

Referenced by TNEGraph::DelEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::DelEdge(), TNEANet::DelEdge(), TNEANet::DelFromFltVAttrDatN(), TNEANet::DelFromIntVAttrDatN(), TCodaAnalyzer::Draw2ModeCommunity(), and TCodaAnalyzer::Dump2ModeCommunities().

1212  {
1213  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1214  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1215  TSizeTy ValN=SearchForw(Val);
1216  if (ValN!=-1){Del(ValN); return true;}
1217  else {return false;}
1218 }
void Del(const TSizeTy &ValN)
Removes the element at position ValN.
Definition: ds.h:1189
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy SearchForw(const TVal &Val, const TSizeTy &BValN=0) const
Returns the position of an element with value Val.
Definition: ds.h:1552
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
void TVec< TVal, TSizeTy >::DelLast ( )
inline
template<class TVal, class TSizeTy>
void TVec< TVal, TSizeTy >::Diff ( const TVec< TVal, TSizeTy > &  ValV)

Subtracts ValV from this vector. Assumes the vectors are sorted!

This vector keeps only elements that do not appear in ValV.

Definition at line 1425 of file ds.h.

1425  {
1426  TVec<TVal, TSizeTy> DiffVec;
1427  Diff(ValV, DiffVec);
1428  MoveFrom(DiffVec);
1429 }
void Diff(const TVec< TVal, TSizeTy > &ValV)
Subtracts ValV from this vector. Assumes the vectors are sorted!
Definition: ds.h:1425
void MoveFrom(TVec< TVal, TSizeTy > &Vec)
Takes over the data and the capacity from Vec.
Definition: ds.h:1073
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy>
void TVec< TVal, TSizeTy >::Diff ( const TVec< TVal, TSizeTy > &  ValV,
TVec< TVal, TSizeTy > &  DstValV 
) const

Sets DstValV to the difference between this vector and ValV. Assumes the vectors are sorted!

DstValV has all the elements of this vector that do not appear in ValV.

Definition at line 1463 of file ds.h.

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

1463  {
1464  DstValV.Clr();
1465  TSizeTy ValN1=0, ValN2=0;
1466  while (ValN1<Len() && ValN2<ValV.Len()) {
1467  const TVal& Val1 = GetVal(ValN1);
1468  while (ValN2<ValV.Len() && Val1>ValV.GetVal(ValN2)) ValN2++;
1469  if (ValN2<ValV.Len()) {
1470  if (Val1!=ValV.GetVal(ValN2)) { DstValV.Add(Val1); }
1471  ValN1++;
1472  }
1473  }
1474  for (TSizeTy RestValN1=ValN1; RestValN1<Len(); RestValN1++){
1475  DstValV.Add(GetVal(RestValN1));}
1476 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:1022
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

template<class TVal, class TSizeTy = int>
bool TVec< TVal, TSizeTy >::Empty ( ) const
inline

Tests whether the vector is empty.

This means the vector contains zero elements (while its capacity may be greater than zero).

Definition at line 570 of file ds.h.

Referenced by TGnuPlot::AddErrBar(), TGnuPlot::AddExpFit(), TTable::AddJointRow(), TStrHash< TDat, TStringPool, THashFunc >::AddKey(), 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(), TBreathFS< PGraph >::DoBfsHybrid(), TMAGAffMtx::Empty(), TKronMtx::Empty(), TUStr::Empty(), TWChA::Empty(), TCnCom::Empty(), TGStatVec::Empty(), THeap< TTriple >::Empty(), PVec< TVal >::Empty(), TSnap::Get1CnCom(), TSnap::Get1CnComSzCnt(), TStr::GetChStr(), TSnap::GetClustCf(), TLocClustStat::TCutInfo::GetFracDegOut(), TEnv::GetIfArgPrefixStrV(), TSnap::GetInvParticipRat(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyId(), TMAGAffMtx::GetMtx(), TKronMtx::GetMtx(), TSnap::GetMxBiCon(), TSnap::GetMxDegNId(), TSnap::GetMxInDegNId(), TSnap::GetMxOutDegNId(), TSnap::GetMxScc(), TSnap::GetMxWcc(), TBreathFS< PGraph >::GetRndPath(), TSnap::GetShortestDistances(), TSnap::GetShortestDistancesMP2(), TStr::GetStr(), TSnap::GetWeightedShortestPath(), TUStr::GetWordUStrV(), TLocClustStat::ImposeNCP(), TTable::IncrementNext(), TBigNet< TNodeData, IsDir >::IsIsoNode(), TBigNet< TNodeData, IsDir >::IsOk(), TLAMisc::LoadMatlabTFltVV(), TSs::LoadTxt(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TLinReg::New(), TSvd::New(), TSsParserMP::Next(), TSsParser::Next(), TSsParser::NextSlow(), 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(), TSnapQueue< int >::Push(), TStrHash< TDat, TStringPool, THashFunc >::Resize(), TGraphKey::SaveGViz(), TNcpGraphsBase::SaveTxtNcpMin(), TStrUtil::SplitOnCh(), and TStrUtil::SplitWords().

570 {return Vals==0;}
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TIter TVec< TVal, TSizeTy >::EndI ( ) const
inline
template<class TVal, class TSizeTy = int>
void TVec< TVal, TSizeTy >::Gen ( const TSizeTy &  _Vals)
inline

Constructs a vector (an array) of _Vals elements.

Definition at line 523 of file ds.h.

Referenced by TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TLogRegFit::CalcLogRegGradient(), TLogRegFit::CalcLogRegNewton(), TCliqueOverlap::CalculateOverlapMtx(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TMAGFitBern::CountAttr(), TMom::Def(), TMAGFitBern::DoEMAlg(), TMAGFitBern::DoEStepApxOneIter(), TMAGFitBern::DoEStepOneIter(), TMAGFitBern::DoMStep(), TSpecFunc::EntropyFracDim(), TSubGraphsEnum::EnumSubGraphs(), TAGMFast::FindComsByCV(), TUniChDb::FindSentenceBoundaries(), TUniChDb::FindWordBoundaries(), TKronNoise::FlipEdgeNoise(), THashMP< TInt, TEdge >::Gen(), TSnapQueue< int >::Gen(), THash< TPair, THash >::Gen(), THashSet< TInt >::Gen(), TVVec< TFlt >::Gen(), TVVVec< TVal, TSizeTy >::Gen(), TSubGraphsEnum::Gen2Graphs(), TBlobBs::GenFFreeBlobPtV(), TCesna::GenHoldOutAttr(), TCesnaUtil::GenHoldOutPairs(), TAGMFastUtil::GenHoldOutPairs(), TMAGAffMtx::GenMtx(), TKronMtx::GenMtx(), TAGMUtil::GenPLSeq(), TBlobBs::GetBlockLenV(), TLocClustStat::GetBoltzmanCurveStat(), TSvd::GetCfUncerV(), TLogRegPredict::GetCfy(), TStr::GetChStr(), TSnap::GetClustCf(), TCodaAnalyzer::GetCmtyVAll(), TAGMFast::GetCmtyVV(), TCoda::GetCmtyVV(), TAGMFit::GetCmtyVV(), TCesna::GetCmtyVV(), TCoda::GetCmtyVVUnSorted(), TCesna::GetCmtyVVUnSorted(), TVVec< TVal, TSizeTy >::GetCol(), THashMP< TKey, TDat, THashFunc >::GetDatV(), THash< TKey, TDat, THashFunc >::GetDatV(), TSparseHash< TKey, TDat, GroupSize >::GetDatV(), TStrHash< TDat, TStringPool, THashFunc >::GetDatV(), TSnap::GetDegCnt(), TSnap::GetDegSeqV(), TMAGParam< TNodeAttr >::GetDimV(), TTimeNENet::GetEdgeBuckets(), TAGMFit::GetEdgeJointCom(), TTimeNENet::GetEdgeTmBuckets(), TTimeNENet::GetEIdByTm(), TNEANetMP::GetEIdV(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TNEANet::GetEIdV(), TBlobBs::GetFFreeBlobPtV(), TGraphAnf< PGraph >::GetGraphAnf(), TSnap::GetInDegCnt(), TGraphEnumUtils::GetIsoGraphs(), TGHash< TDat >::GetKeyIdByDat(), TGHash< TDat >::GetKeyIdByGSz(), THashMP< TKey, TDat, THashFunc >::GetKeyV(), THash< TKey, TDat, THashFunc >::GetKeyV(), TSparseHash< TKey, TDat, GroupSize >::GetKeyV(), TSparseSet< TKey, GroupSize >::GetKeyV(), TStrHash< TDat, TStringPool, THashFunc >::GetKeyV(), TBPGraph::GetLNIdV(), TComb::GetNext(), TTimeNet::GetNIdByTm(), TTimeNENet::GetNIdByTm(), TCesnaUtil::GetNIdPhiV(), TAGMFastUtil::GetNIdPhiV(), TNGraphMP::GetNIdV(), TUNGraph::GetNIdV(), TNEANetMP::GetNIdV(), TNGraph::GetNIdV(), TNEGraph::GetNIdV(), TBPGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TNEANet::GetNIdV(), TUndirNet::GetNIdV(), TDirNet::GetNIdV(), TGraphAnf< PGraph >::GetNodeAnf(), TTimeNet::GetNodeBuckets(), TTimeNENet::GetNodeBuckets(), TSnap::GetNodeWcc(), TCoda::GetNonEdgePairScores(), TSnap::GetOutDegCnt(), TAGMFit::GetQV(), TBPGraph::GetRNIdV(), TVVec< TVal, TSizeTy >::GetRow(), TSnap::GetShortestDistances(), TSnap::GetShortestDistancesMP2(), TSnap::TSnapDetail::GetSphereDev(), TStrHash< TDat, TStringPool, THashFunc >::GetStrIdV(), TVec< TVal, TSizeTy >::GetSubValV(), TQQueue< TInt >::GetSubValV(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TSnap::GetTreeSig(), TGStatVec::GetValV(), TLinReg::GetXV(), TSvd::GetXV(), TMAGFitBern::GradApxAffMtx(), TKroneckerLL::GradDescent(), TLogRegFit::Gradient(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TCesna::GradientForWK(), TAGMFit::GradLogLForLambda(), TForestFire::Infect(), TForestFire::InfectAll(), TForestFire::InfectRnd(), TGraphAnf< PGraph >::InitAnfBits(), TKroneckerLL::InitLL(), TAGMFit::InitNodeData(), TTable::InitRowIdBuckets(), TCesna::InitW(), TSimpleGraph::Join(), TCoda::LikelihoodForNode(), TAGMFast::LikelihoodForRow(), TCesna::LikelihoodForRow(), TAGMUtil::LoadCmtyVV(), TKeyDatFl< TKey, TDat, THashFunc >::LoadDatV(), TKeyDatFl< TKey, TDat, THashFunc >::LoadKeyV(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TBigStrPool::LoadPoolShM(), TGnuPlot::LoadTs(), TMAGNodeBern::LoadTxt(), TMAGNodeBeta::LoadTxt(), TMAGFitBern::MakeCCDF(), TGnuPlot::MakeExpBins(), TLocClustStat::MakeExpBins(), TAGMFast::NeighborComInit(), TCoda::NeighborComInit(), TCesna::NeighborComInit(), TMom::NewV(), TSparseSVD::Project(), TWChA::PutCStr(), TAGMFast::RandomInit(), TCoda::RandomInit(), TCesna::RandomInit(), TKronNoise::RemoveEdgeNoise(), TStrHash< TDat, TStringPool, THashFunc >::Resize(), TKronMaxLL::RoundTheta(), TKroneckerLL::RunEStep(), TKroneckerLL::RunKronEM(), TKroneckerLL::SampleGradient(), TMAGNodeSimple::SaveTxt(), TMAGNodeBern::SaveTxt(), TMAGNodeBeta::SaveTxt(), TUniChDb::SbEx_Add(), TKroneckerLL::SetBestDegPerm(), TAGMFast::SetCmtyVV(), TCoda::SetCmtyVV(), TCesna::SetCmtyVV(), 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(), TGraphKey::TGraphKey(), TMAGFitBern::TMAGFitBern(), TMAGNodeBeta::TMAGNodeBeta(), TSnap::ToGraphMP3(), TLAMisc::ToVec(), TSubGraphEnum< TGraphCounter >::TSVec::TSVec(), TVecPool< TVal, TSizeTy >::TVecPool(), TGLib_OLD::TVecPool< TVal >::TVecPool(), TVec< TVal, TSizeTy >::Union(), TMAGFitBern::UpdateApxPhiMI(), TMAGFitBern::UpdatePhi(), and TMAGFitBern::UpdatePhiMI().

523  { IAssert(0<=_Vals);
524  if (ValT!=NULL && MxVals!=-1){delete[] ValT;} MxVals=Vals=_Vals;
525  if (MxVals==0){ValT=NULL;} else {ValT=new TVal[MxVals];}}
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

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

Constructs a vector (an array) of _Vals elements, while reserving enough memory for _MxVals elements.

Definition at line 527 of file ds.h.

527  { IAssert((0<=_Vals)&&(_Vals<=_MxVals));
528  if (ValT!=NULL && MxVals!=-1){delete[] ValT;} MxVals=_MxVals; Vals=_Vals;
529  if (_MxVals==0){ValT=NULL;} else {ValT=new TVal[_MxVals];}}
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal, class TSizeTy = int>
void TVec< TVal, TSizeTy >::GenExt ( TVal *  _ValT,
const TSizeTy &  _Vals 
)
inline

Constructs a vector of _Vals elements of memory array _ValT.

The data is not copied and the vector does not own the memory (the vector won't free the memory at destruction).

Definition at line 534 of file ds.h.

Referenced by TNGraphMP::AddNode(), TUNGraph::AddNode(), TNGraph::AddNode(), TUndirNet::AddNode(), TDirNet::AddNode(), TVecPool< TInt >::GetV(), and TGLib_OLD::TVecPool< TVal >::GetV().

534  {
535  if (ValT!=NULL && MxVals!=-1){delete[] ValT;}
536  MxVals=-1; Vals=_Vals; ValT=_ValT;}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TVal& TVec< TVal, TSizeTy >::GetAddDat ( const TVal &  Val)
inline

Returns reference to the first occurrence of element Val.

If the element does not exist, we add it at the end of the vector.

Definition at line 842 of file ds.h.

842  { AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
843  const TSizeTy ValN=SearchForw(Val); if (ValN==-1){Add(Val); return Last();} else {return GetVal(ValN);}}
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649
const TVal & Last() const
Returns a reference to the last element of the vector.
Definition: ds.h:579
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
TSizeTy SearchForw(const TVal &Val, const TSizeTy &BValN=0) const
Returns the position of an element with value Val.
Definition: ds.h:1552
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
template<class TVal, class TSizeTy = int>
const TVal& TVec< TVal, TSizeTy >::GetDat ( const TVal &  Val) const
inline
template<class TVal, class TSizeTy = int>
TIter TVec< TVal, TSizeTy >::GetI ( const TSizeTy &  ValN) const
inline
template<class TVal, class TSizeTy = int>
TSizeTy TVec< TVal, TSizeTy >::GetMemSize ( ) const
inline

Returns the memory size (the number of bytes) of a binary representation.

Definition at line 514 of file ds.h.

514  {
515  return TSizeTy(2*sizeof(TVal)+sizeof(TSizeTy)*Vals);}
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
template<class TVal, class TSizeTy = int>
TSizeTy TVec< TVal, TSizeTy >::GetMemUsed ( ) const
inline

Returns the memory footprint (the number of bytes) of the vector.

Definition at line 511 of file ds.h.

Referenced by TWChA::GetMemUsed(), THashMP< TInt, TEdge >::GetMemUsed(), THash< TPair, THash >::GetMemUsed(), GroupStmt::GetMemUsed(), TSparseTable< TKey, GroupSize >::GetMemUsed(), TStrHash< TInt, TBigStrPool >::GetMemUsed(), THashSet< TInt >::GetMemUsed(), TTree< TVal >::GetMemUsed(), and TTable::GetMemUsedKB().

511  {
512  return TSizeTy(2*sizeof(TSizeTy)+sizeof(TVal*)+MxVals*sizeof(TVal));}
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434

Here is the caller graph for this function:

template<class TVal , class TSizeTy >
TSizeTy TVec< TVal, TSizeTy >::GetMxValN ( ) const

Returns the position of the largest element in the vector.

Definition at line 1579 of file ds.h.

1579  {
1580  if (Vals==0){return -1;}
1581  TSizeTy MxValN=0;
1582  for (TSizeTy ValN=1; ValN<Vals; ValN++){
1583  if (ValT[ValN]>ValT[MxValN]){MxValN=ValN;}
1584  }
1585  return MxValN;
1586 }
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436
template<class TVal , class TSizeTy>
TSizeTy TVec< TVal, TSizeTy >::GetPivotValN ( const TSizeTy &  LValN,
const TSizeTy &  RValN 
) const

Picks three random elements at positions LValN...RValN and returns the middle one.

Definition at line 1265 of file ds.h.

References TInt::GetRnd(), and TInt::Mx.

1265  {
1266  TSizeTy SubVals=RValN-LValN+1;
1267  if (SubVals > TInt::Mx-1) { SubVals = TInt::Mx-1; }
1268  const TSizeTy ValN1=LValN+TInt::GetRnd(int(SubVals));
1269  const TSizeTy ValN2=LValN+TInt::GetRnd(int(SubVals));
1270  const TSizeTy ValN3=LValN+TInt::GetRnd(int(SubVals));
1271  const TVal& Val1=ValT[ValN1];
1272  const TVal& Val2=ValT[ValN2];
1273  const TVal& Val3=ValT[ValN3];
1274  if (Val1<Val2){
1275  if (Val2<Val3){return ValN2;}
1276  else if (Val3<Val1){return ValN1;}
1277  else {return ValN3;}
1278  } else {
1279  if (Val1<Val3){return ValN1;}
1280  else if (Val3<Val2){return ValN2;}
1281  else {return ValN3;}
1282  }
1283 }
static const int Mx
Definition: dt.h:1142
static int GetRnd(const int &Range=0)
Definition: dt.h:1178
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the call graph for this function:

template<class TVal, class TSizeTy = int>
template<class TCmp >
static TIter TVec< TVal, TSizeTy >::GetPivotValNCmp ( const TIter BI,
const TIter EI,
const TCmp Cmp 
)
inlinestatic

Picks three random elements at positions BI...EI and returns the middle one under the comparator Cmp.

Definition at line 729 of file ds.h.

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

729  {
730  TSizeTy SubVals=TSizeTy(EI-BI); if (SubVals > TInt::Mx-1) { SubVals = TInt::Mx-1; }
731  const TSizeTy ValN1=TInt::GetRnd(SubVals), ValN2=TInt::GetRnd(SubVals), ValN3=TInt::GetRnd(SubVals);
732  const TVal& Val1 = *(BI+ValN1); const TVal& Val2 = *(BI+ValN2); const TVal& Val3 = *(BI+ValN3);
733  if (Cmp(Val1, Val2)) {
734  if (Cmp(Val2, Val3)) return BI+ValN2;
735  else if (Cmp(Val3, Val1)) return BI+ValN1;
736  else return BI+ValN3;
737  } else {
738  if (Cmp(Val1, Val3)) return BI+ValN1;
739  else if (Cmp(Val3, Val2)) return BI+ValN2;
740  else return BI+ValN3; } }
static const int Mx
Definition: dt.h:1142
static int GetRnd(const int &Range=0)
Definition: dt.h:1178
bool Cmp(const int &RelOp, const TRec &Rec1, const TRec &Rec2)
Definition: bd.h:426

Here is the caller graph for this function:

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

Returns primary hash code of the vector. Used by THash.

Definition at line 999 of file ds.h.

References TPairHashImpl2::GetHashCd().

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

999  {
1000  int hc = 0;
1001  for (TSizeTy i=0; i<Vals; i++){
1003  }
1004  return hc;
1005 }
int GetPrimHashCd() const
Returns primary hash code of the vector. Used by THash.
Definition: ds.h:999
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
const TVal& TVec< TVal, TSizeTy >::GetRndVal ( TRnd Rnd = TInt::Rnd) const
inline

Returns a reference to a random element in the vector.

Definition at line 589 of file ds.h.

Referenced by TSnap::SamplePersonalizedPageRank().

589 { return GetVal(Rnd.GetUniDevInt(Len())); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649
int GetUniDevInt(const int &Range=0)
Definition: dt.cpp:39

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TVal& TVec< TVal, TSizeTy >::GetRndVal ( TRnd Rnd = TInt::Rnd)
inline

Returns a reference to a random element in the vector.

Definition at line 591 of file ds.h.

591 { return GetVal(Rnd.GetUniDevInt(Len())); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649
int GetUniDevInt(const int &Range=0)
Definition: dt.cpp:39
template<class TVal , class TSizeTy >
int TVec< TVal, TSizeTy >::GetSecHashCd ( ) const

Returns secondary hash code of the vector. Used by THash.

Definition at line 1011 of file ds.h.

References TPairHashImpl2::GetHashCd().

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

1011  {
1012  int hc = 0;
1013  for (TSizeTy i=0; i<Vals; i++){
1015  }
1016  if (Vals > 0) {
1017  hc = TPairHashImpl::GetHashCd(hc, ValT[0].GetSecHashCd()); }
1018  return hc;
1019 }
int GetSecHashCd() const
Returns secondary hash code of the vector. Used by THash.
Definition: ds.h:1011
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the call graph for this function:

Here is the caller graph for this function:

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

Fills ValV with elements at positions BValN...EValN.

Definition at line 1170 of file ds.h.

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

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

1170  {
1171  const TSizeTy BValN=TInt::GetInRng(_BValN, 0, Len()-1);
1172  const TSizeTy EValN=TInt::GetInRng(_EValN, 0, Len()-1);
1173  const TSizeTy SubVals=TInt::GetMx(0, EValN-BValN+1);
1174  SubValV.Gen(SubVals, 0);
1175  for (TSizeTy ValN=BValN; ValN<=EValN; ValN++){
1176  SubValV.Add(GetVal(ValN));}
1177 }
static int GetInRng(const int &Val, const int &Mn, const int &Mx)
Definition: dt.h:1197
static int GetMx(const int &Int1, const int &Int2)
Definition: dt.h:1185
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::GetV ( const TVal &  Val1)
inlinestatic

Returns a vector on element Val1.

Definition at line 848 of file ds.h.

848  {
849  TVec<TVal, TSizeTy> V(1, 0); V.Add(Val1); return V;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::GetV ( const TVal &  Val1,
const TVal &  Val2 
)
inlinestatic

Returns a vector on elements Val1, Val2.

Definition at line 851 of file ds.h.

851  {
852  TVec<TVal, TSizeTy> V(2, 0); V.Add(Val1); V.Add(Val2); return V;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3 
)
inlinestatic

Returns a vector on elements Val1...Val3.

Definition at line 854 of file ds.h.

854  {
855  TVec<TVal, TSizeTy> V(3, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); return V;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4 
)
inlinestatic

Returns a vector on elements Val1...Val4.

Definition at line 857 of file ds.h.

857  {
858  TVec<TVal, TSizeTy> V(4, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); return V;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5 
)
inlinestatic

Returns a vector on elements Val1...Val5.

Definition at line 860 of file ds.h.

860  {
861  TVec<TVal, TSizeTy> V(5, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); V.Add(Val5); return V;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5,
const TVal &  Val6 
)
inlinestatic

Returns a vector on elements Val1...Val6.

Definition at line 863 of file ds.h.

863  {
864  TVec<TVal, TSizeTy> V(6, 0); V.Add(Val1); V.Add(Val2); V.Add(Val3); V.Add(Val4); V.Add(Val5); V.Add(Val6); return V;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::GetV ( const TVal &  Val1,
const TVal &  Val2,
const TVal &  Val3,
const TVal &  Val4,
const TVal &  Val5,
const TVal &  Val6,
const TVal &  Val7 
)
inlinestatic

Returns a vector on elements Val1...Val7.

Definition at line 866 of file ds.h.

866  {
867  TVec<TVal, TSizeTy> 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;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::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 
)
inlinestatic

Returns a vector on elements Val1...Val8.

Definition at line 869 of file ds.h.

869  {
870  TVec<TVal, TSizeTy> 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;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
static TVec<TVal, TSizeTy> TVec< TVal, TSizeTy >::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 
)
inlinestatic

Returns a vector on elements Val1...Val9.

Definition at line 872 of file ds.h.

872  {
873  TVec<TVal, TSizeTy> 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;}
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy = int>
const TVal& TVec< TVal, TSizeTy >::GetVal ( const TSizeTy &  ValN) const
inline

Returns a reference to the element at position ValN in the vector.

Definition at line 649 of file ds.h.

Referenced by TSnap::CascFind(), TSnap::CascFindMP(), TSnap::CascGraphSource(), TSnap::CascGraphTime(), TVec< TVal, TSizeTy >::Diff(), TCrossNet::EdgeAttrIsFltDeleted(), TNEANetMP::EdgeAttrIsFltDeleted(), TNEANet::EdgeAttrIsFltDeleted(), TCrossNet::EdgeAttrIsIntDeleted(), TNEANetMP::EdgeAttrIsIntDeleted(), TNEANet::EdgeAttrIsIntDeleted(), TSnap::findMinimum(), TCrossNet::FltAttrValueEI(), TNEANetMP::FltAttrValueEI(), TNEANet::FltAttrValueEI(), TNEANetMP::FltAttrValueNI(), TNEANet::FltAttrValueNI(), TVec< TSparseGroup >::GetAddDat(), TVec< TSparseGroup >::GetDat(), TCrossNet::GetEdgeAttrValue(), TNEANetMP::GetEdgeAttrValue(), TNEANet::GetEdgeAttrValue(), TNEANetMP::GetNodeAttrValue(), TNEANet::GetNodeAttrValue(), TVec< TSparseGroup >::GetRndVal(), TSnap::GetShortestDistances(), TSnap::GetShortestDistancesMP2(), TCrossNet::IntAttrValueEI(), TNEANetMP::IntAttrValueEI(), TNEANet::IntAttrValueEI(), TNEANetMP::IntAttrValueNI(), TNEANet::IntAttrValueNI(), TVec< TVal, TSizeTy >::Intrs(), TVec< TVal, TSizeTy >::IntrsLen(), TVec< TSparseGroup >::Last(), TNEANetMP::NodeAttrIsFltDeleted(), TNEANet::NodeAttrIsFltDeleted(), TNEANetMP::NodeAttrIsIntDeleted(), TNEANet::NodeAttrIsIntDeleted(), TSnap::ToGraphMP(), TSnap::ToNetworkMP(), TSnap::ToNetworkMP2(), TVec< TVal, TSizeTy >::Union(), and TVec< TVal, TSizeTy >::UnionLen().

649 {return operator[](ValN);}
const TVal & operator[](const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:503

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TVal& TVec< TVal, TSizeTy >::GetVal ( const TSizeTy &  ValN)
inline

Returns a reference to the element at position ValN in the vector.

Definition at line 651 of file ds.h.

651 {return operator[](ValN);}
const TVal & operator[](const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:503
template<class TVal , class TSizeTy>
TStr TVec< TVal, TSizeTy >::GetXOutOfBoundsErrMsg ( const TSizeTy &  ValN) const
protected

Constructs the out of bounds error message.

Definition at line 913 of file ds.h.

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

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

913  {
914  return TStr()+
915  "Index:"+TInt::GetStr(ValN)+
916  " Vals:"+TInt::GetStr(Vals)+
917  " MxVals:"+TInt::GetStr(MxVals)+
918  " Type:"+GetTypeNm(*this);
919 }
TStr GetTypeNm(const Type &Var)
Definition: ut.h:16
TStr GetStr() const
Definition: dt.h:1200
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
Definition: dt.h:412
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435

Here is the call graph for this function:

Here is the caller graph for this function:

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

Inserts new element Val before the element at position ValN.

Definition at line 1180 of file ds.h.

References Assert, AssertR, and EAssertR.

Referenced by TNEANet::AddAttributes(), TCrossNet::AddEdge(), TNEANetMP::AddEdge(), TNEANet::AddEdge(), TCrossNet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatE(), TNEANet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatN(), TNEANet::AddFltAttrDatN(), TCrossNet::AddFltAttrE(), TNEANetMP::AddFltAttrE(), TNEANet::AddFltAttrE(), TNEANetMP::AddFltAttrN(), TNEANet::AddFltAttrN(), TCrossNet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatE(), TNEANet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatN(), TNEANet::AddIntAttrDatN(), TCrossNet::AddIntAttrE(), TNEANetMP::AddIntAttrE(), TNEANet::AddIntAttrE(), TNEANetMP::AddIntAttrN(), TNEANet::AddIntAttrN(), TNEANetMP::AddNode(), TCrossNet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatE(), TNEANet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatN(), TNEANet::AddStrAttrDatN(), TCrossNet::AddStrAttrE(), TNEANetMP::AddStrAttrE(), TNEANet::AddStrAttrE(), TNEANetMP::AddStrAttrN(), and TNEANet::AddStrAttrN().

1180  {
1181  EAssertR(!(IsShM && (MxVals == -1)), "Cannot write to shared memory");
1182  AssertR(MxVals!=-1, "This vector was obtained from TVecPool. Such vectors cannot change its size!");
1183  Add(); Assert((0<=ValN)&&(ValN<Vals));
1184  for (TSizeTy MValN=Vals-2; MValN>=ValN; MValN--){ValT[MValN+1]=ValT[MValN];}
1185  ValT[ValN]=Val;
1186 }
#define Assert(Cond)
Definition: bd.h:251
TSizeTy MxVals
Vector capacity. Capacity is the size of allocated storage. If MxVals==-1, then ValT is not owned by ...
Definition: ds.h:434
#define EAssertR(Cond, MsgStr)
Definition: bd.h:283
bool IsShM
Definition: ds.h:437
#define AssertR(Cond, Reason)
Definition: bd.h:258
TSizeTy Vals
Vector length. Length is the number of elements stored in the vector.
Definition: ds.h:435
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
TVal * ValT
Pointer to the memory where the elements of the vector are stored.
Definition: ds.h:436

Here is the caller graph for this function:

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

Sets this vector to its intersection with ValV. Assumes the vectors are sorted!

Definition at line 1411 of file ds.h.

1411  {
1412  TVec<TVal, TSizeTy> IntrsVec;
1413  Intrs(ValV, IntrsVec);
1414  MoveFrom(IntrsVec);
1415 }
void Intrs(const TVec< TVal, TSizeTy > &ValV)
Sets this vector to its intersection with ValV. Assumes the vectors are sorted!
Definition: ds.h:1411
void MoveFrom(TVec< TVal, TSizeTy > &Vec)
Takes over the data and the capacity from Vec.
Definition: ds.h:1073
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:430
template<class TVal, class TSizeTy>
void TVec< TVal, TSizeTy >::Intrs ( const TVec< TVal, TSizeTy > &  ValV,
TVec< TVal, TSizeTy > &  DstValV 
) const

Sets DstValV to the intersection of this vector and ValV. Assumes the vectors are sorted!

Definition at line 1432 of file ds.h.

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

1432  {
1433  DstValV.Clr();
1434  TSizeTy ValN1=0, ValN2=0;
1435  while ((ValN1<Len())&&(ValN2<ValV.Len())){
1436  const TVal& Val1=GetVal(ValN1);
1437  while ((ValN2<ValV.Len())&&(Val1>ValV.GetVal(ValN2))){
1438  ValN2++;}
1439  if ((ValN2<ValV.Len())&&(Val1==ValV.GetVal(ValN2))){
1440  DstValV.Add(Val1); ValN2++;}
1441  ValN1++;
1442  }
1443 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:1022
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:

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

Returns the size of the intersection of vectors this and ValV. Assumes the vectors are sorted!

Definition at line 1479 of file ds.h.

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

Referenced by TSnap::ReebSimplify().

1479  {
1480  TSizeTy Cnt=0, ValN1=0, ValN2=0;
1481  while ((ValN1<Len())&&(ValN2<ValV.Len())){
1482  const TVal& Val1=GetVal(ValN1);
1483  while ((ValN2<ValV.Len())&&(Val1>ValV.GetVal(ValN2))){
1484  ValN2++;}
1485  if ((ValN2<ValV.Len())&&(Val1==ValV.GetVal(ValN2))){
1486  ValN2++; Cnt++;}
1487  ValN1++;
1488  }
1489  return Cnt;
1490 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
const TVal & GetVal(const TSizeTy &ValN) const
Returns a reference to the element at position ValN in the vector.
Definition: ds.h:649

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal, class T