IntArrayList Class Reference

#include <IntArrayList.h>

List of all members.

Public Member Functions

long Add (long a)
long AddIfNotLast (long item)
 If the last item of the array is not Item, then add it.
void AddRange (long count, long val)
void Alloc (long size)
void Alloc ()
long BinarySearch (long count, long item)
long BinarySearch (long item)
void Clear ()
long CountWithoutMask (long *ptr)
 Computes how many elements are not set in the mask.
void Fill (const IntArrayList &al)
void Initialize (long val)
void Initialize ()
void InitIdentity ()
void Insert (long pos, long item)
 IntArrayList (const IntArrayList &al)
 IntArrayList (long n, long *data)
 IntArrayList (long capacity)
 IntArrayList ()
long & operator[] (const long i)
long operator[] (const long i) const
void RemoveAt (long pos)
void RemoveByBattern (long *ptr)
 If ptr[element] is nonzero, then element will be removed from the array.
void RemoveMarkByBattern (long *ptr)
 If ptr[element] is nonzero, then element will be removed from the array. All remaining elements update ptr[element] to 1.
void SetIndexesTo (long *ptr, long val)
 Sets items of a ptr* array using all indexes stored in this array.
void SetIndexesToMap (long *ptr)
 Sets ~indexes of a ptr* array using all values stored in this array.
void SortInsert (long item)
long SortInsertIfNot (long item)
long SumElements ()
 Sums all contained integers.
bool TestSetIndexesTo (long *ptr, long valtest, long valset, bool &ind)
long * ToArray ()
void TrimToSize ()
virtual ~IntArrayList ()

Public Attributes

long Capacity
long Count
long * Items

Detailed Description

Definition at line 11 of file IntArrayList.h.


Constructor & Destructor Documentation

IntArrayList (  ) 

Definition at line 7 of file IntArrayList.cpp.

References Capacity, Count, and Items.

IntArrayList ( long  capacity  ) 

Definition at line 14 of file IntArrayList.cpp.

References Capacity, Count, and Items.

IntArrayList ( long  n,
long *  data 
)

Definition at line 20 of file IntArrayList.cpp.

References Capacity, Array::Copy(), Count, and Items.

IntArrayList ( const IntArrayList al  ) 

Definition at line 33 of file IntArrayList.cpp.

References Capacity, Array::Copy(), Count, and Items.

~IntArrayList (  )  [virtual]

Definition at line 40 of file IntArrayList.cpp.

References Items.


Member Function Documentation

long Add ( long  a  ) 
long AddIfNotLast ( long  item  ) 

If the last item of the array is not Item, then add it.

Parameters:
item Item
Returns:
index of item

Definition at line 90 of file IntArrayList.cpp.

References Add(), Count, and Items.

Referenced by DSSolver::CreateFixedArray().

void AddRange ( long  count,
long  val 
)

Definition at line 62 of file IntArrayList.cpp.

References Capacity, Array::Copy(), Count, and Items.

void Alloc ( long  size  ) 

Definition at line 127 of file IntArrayList.cpp.

References Capacity, Count, Initialize(), and Items.

void Alloc (  ) 
long BinarySearch ( long  count,
long  item 
)

Definition at line 224 of file IntArrayList.cpp.

References h(), and Items.

long BinarySearch ( long  item  ) 
void Clear (  ) 

Definition at line 97 of file IntArrayList.cpp.

References Count.

Referenced by ColHash::Clear().

long CountWithoutMask ( long *  ptr  ) 

Computes how many elements are not set in the mask.

Parameters:
ptr mask

Definition at line 355 of file IntArrayList.cpp.

References Count, Items, and p.

Referenced by MD_Qqraph::ApproximateMinumumDegree().

void Fill ( const IntArrayList al  ) 

Definition at line 79 of file IntArrayList.cpp.

References Capacity, Array::Copy(), Count, and Items.

Referenced by MD_Qqraph::Eliminate().

void Initialize ( long  val  ) 

Definition at line 148 of file IntArrayList.cpp.

References Count, Items, and p.

void Initialize (  ) 

Definition at line 143 of file IntArrayList.cpp.

References Count, Items, and memset().

Referenced by Alloc(), and DSSolver::LoadMCN().

void InitIdentity (  ) 
void Insert ( long  pos,
long  item 
)
long& operator[] ( const long  i  )  [inline]

Definition at line 39 of file IntArrayList.h.

References Items.

long operator[] ( const long  i  )  const [inline]

Definition at line 34 of file IntArrayList.h.

References Items.

void RemoveAt ( long  pos  ) 

Definition at line 212 of file IntArrayList.cpp.

References Array::Copy(), Count, and Items.

Referenced by MD_Qqraph::ComputeAMD_w_Le_Lp().

void RemoveByBattern ( long *  ptr  ) 

If ptr[element] is nonzero, then element will be removed from the array.

Parameters:
ptr Mask of which elements must be removed.

Definition at line 315 of file IntArrayList.cpp.

References Count, and Items.

Referenced by MD_Qqraph::Eliminate().

void RemoveMarkByBattern ( long *  ptr  ) 

If ptr[element] is nonzero, then element will be removed from the array. All remaining elements update ptr[element] to 1.

Parameters:
ptr Mask of which elements must be removed.

Definition at line 336 of file IntArrayList.cpp.

References Count, and Items.

Referenced by MD_Qqraph::Eliminate().

void SetIndexesTo ( long *  ptr,
long  val 
)

Sets items of a ptr* array using all indexes stored in this array.

Parameters:
ptr update items of this array
val set value

Definition at line 278 of file IntArrayList.cpp.

References Count, Items, and p.

Referenced by MD_Qqraph::Eliminate(), MD_Qqraph::ExternalDegree(), MD_Qqraph::GenerateMD(), MD_Qqraph::IsIndistinguishable(), and SparseConectivityMtxII::SparseConectivityMtxII().

void SetIndexesToMap ( long *  ptr  ) 

Sets ~indexes of a ptr* array using all values stored in this array.

Parameters:
ptr update items of this array

Definition at line 288 of file IntArrayList.cpp.

References Count, Items, and p.

void SortInsert ( long  item  ) 
long SortInsertIfNot ( long  item  ) 

Definition at line 176 of file IntArrayList.cpp.

References BinarySearch(), and Insert().

long SumElements (  ) 

Sums all contained integers.

Returns:
The sum.

Definition at line 265 of file IntArrayList.cpp.

References Count, Items, and p.

Referenced by MD_Qqraph::Hash().

bool TestSetIndexesTo ( long *  ptr,
long  valtest,
long  valset,
bool &  ind 
)

Definition at line 300 of file IntArrayList.cpp.

References Count, Items, and p.

Referenced by MD_Qqraph::IsIndistinguishable().

long * ToArray (  ) 

Definition at line 255 of file IntArrayList.cpp.

References Count, and Items.

void TrimToSize (  ) 

Definition at line 102 of file IntArrayList.cpp.

References Capacity, Array::Copy(), Count, and Items.

Referenced by MD_Qqraph::Eliminate().


Member Data Documentation

long Capacity
long Count

Definition at line 15 of file IntArrayList.h.

Referenced by Add(), AddIfNotLast(), AddRange(), Alloc(), SkyLineMtx::AllocateMemory(), MD_Qqraph::ApproximateMinumumDegree(), BinarySearch(), Clear(), ColHash::Clear(), MD_Qqraph::ClearAMD_w(), SparseConectivityMtxII::ColumnLength(), MD_Qqraph::ComputeAMD_w_Le_Lp(), CMcKee::ComputeLevels(), DSSolver::condense(), CountWithoutMask(), DSSolver::CreateFixedArray(), DSSolver::CreateNewSparseGridMtx(), MD_Qqraph::Eliminate(), DSSolver::ExpandMCN(), MD_Qqraph::ExternalDegree(), Fill(), MD_Qqraph::GenerateMD(), SparseConectivityMtxII::Get_ColAMD(), SparseConectivityMtxII::Get_Reverse_Cuthill_McKee(), DSSolver::GetA12block(), SparseConectivityMtxII::GetCmpRows(), SparseConectivityMtxII::GetOrder_Cuthill_McKee2(), LargeVectorAttach::GetPermuted_1Vector(), LargeVectorAttach::GetPermutedVector(), SparseGridColumn::GetValue(), Initialize(), InitIdentity(), Insert(), IntArrayList(), DSSolver::LoadMCN(), DSSolver::LoadMCN_int(), Ordering::Ordering(), DSSolver::PreFactorizeSchur(), CBiSection::RecurBiSectOrder(), RemoveAt(), RemoveByBattern(), RemoveMarkByBattern(), SetIndexesTo(), SetIndexesToMap(), SparseGridColumn::SetValue(), SortInsert(), SparseConectivityMtxII::SparseConectivityMtxII(), SparseGridColumn::SparseGridColumn(), SparseGridMtx::SparseGridMtx(), DSSolver::StoreFixedLastPermutation_dom_order(), SumElements(), MD_Qqraph::SupervariablesDetection(), TestSetIndexesTo(), ToArray(), TrimToSize(), SparseGridMtxLU::WriteCondensedMatrixA22(), SparseGridMtxLL::WriteCondensedMatrixA22(), and SparseGridMtxLDL::WriteCondensedMatrixA22().

long* Items

Definition at line 14 of file IntArrayList.h.

Referenced by Add(), AddIfNotLast(), AddRange(), Alloc(), SkyLineMtx::AllocateMemory(), MD_Qqraph::ApproximateMinumumDegree(), SparseGridMtxLL::BackSubstLT(), SparseGridMtxLDL::BackSubstLT(), SparseGridMtxLU::BackSubstU(), BinarySearch(), ColHash::Clear(), CMcKee::ComputeLevels(), DSSolver::condense(), CountWithoutMask(), DSSolver::CreateFixedArray(), SparseGridMtxLU::ElementAt(), SparseGridMtxLL::ElementAt(), SparseGridMtxLDL::ElementAt(), MD_Qqraph::Eliminate(), MD_Qqraph::ExternalDegree(), SparseGridMtxLU::Factorize(), SparseGridMtxLL::Factorize(), SparseGridMtxLDL::Factorize(), SparseGridMtxLL::Factorize_Incomplete(), SparseGridMtxLDL::Factorize_Incomplete(), SparseGridMtxLDL::FactorizeOMP(), Fill(), SparseGridMtxLU::ForwardSubstL(), SparseGridMtxLL::ForwardSubstL(), SparseGridMtxLDL::ForwardSubstL(), MD_Qqraph::GenerateMD(), SparseConectivityMtxII::Get_ColAMD(), SparseConectivityMtxII::Get_MetisDiSection(), SparseConectivityMtxII::Get_Reverse_Cuthill_McKee(), SparseConectivityMtxII::GetCmpRows(), SparseConectivityMtxII::GetOrder_Cuthill_McKee2(), SparseGridColumn::GetValue(), Initialize(), InitIdentity(), Insert(), IntArrayList(), SkyLineMtxLDL::LoadMatrixData(), SparseGridMtxLU::LoadMatrixNumbers(), SparseGridMtxLL::LoadMatrixNumbers(), SparseGridMtxLDL::LoadMatrixNumbers(), DSSolver::LoadMCN(), DSSolver::LoadMCN_int(), SparseGridMtxLU::LoadZeros(), SparseGridMtxLL::LoadZeros(), SparseGridMtxLDL::LoadZeros(), SparseGridMtxLDL::MultiplyByVector(), operator[](), Ordering::Ordering(), CBiSection::RecurBiSectOrder(), RemoveAt(), RemoveByBattern(), RemoveMarkByBattern(), SparseGridMtxLU::SchurComplementFactorization(), SparseGridMtxLL::SchurComplementFactorization(), SparseGridMtxLDL::SchurComplementFactorization(), SetIndexesTo(), SetIndexesToMap(), SparseGridColumn::SetValue(), DSSolver::Solve(), SparseGridMtxLDL::SolveD(), SparseGridMtxLDL::SolveLDL_node_perm(), SortInsert(), SparseConectivityMtxII::SparseConectivityMtxII(), SparseGridMtx::SparseGridMtx(), DSSolver::StoreFixedLastPermutation_dom_order(), SparseGridMtxLDL::SubMultL12(), SparseGridMtxLDL::SubMultL12T(), SparseGridMtxLU::SubMultL21(), SparseGridMtxLU::SubMultU12(), SumElements(), MD_Qqraph::SupervariablesDetection(), TestSetIndexesTo(), ToArray(), TrimToSize(), SparseGridMtxLU::WriteCondensedMatrixA22(), SparseGridMtxLL::WriteCondensedMatrixA22(), SparseGridMtxLDL::WriteCondensedMatrixA22(), and ~IntArrayList().


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

Generated by  doxygen 1.6.2