#include <IntArrayList.h>
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 |
Definition at line 11 of file IntArrayList.h.
IntArrayList | ( | ) |
Definition at line 7 of file IntArrayList.cpp.
IntArrayList | ( | long | capacity | ) |
Definition at line 14 of file IntArrayList.cpp.
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.
long Add | ( | long | a | ) |
Definition at line 46 of file IntArrayList.cpp.
References Capacity, Array::Copy(), Count, and Items.
Referenced by AddIfNotLast(), ColHash::AddValue(), DSSolver::ExpandMCN(), and MD_Qqraph::GenerateMD().
long AddIfNotLast | ( | long | item | ) |
If the last item of the array is not Item, then add it.
item | 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 | ( | ) |
Definition at line 114 of file IntArrayList.cpp.
References Capacity, Count, and Initialize().
Referenced by DSSolver::CreateFixedArray(), MD_Qqraph::GenerateMD(), SparseConectivityMtxII::GetOrder_Cuthill_McKee2(), DSSolver::LoadMCN(), DSSolver::LoadMCN_int(), Ordering::Ordering(), DSSolver::StoreFixedLastPermutation_dom_order(), and MD_Qqraph::SupervariablesDetection().
long BinarySearch | ( | long | count, | |
long | item | |||
) |
Definition at line 224 of file IntArrayList.cpp.
long BinarySearch | ( | long | item | ) |
Definition at line 218 of file IntArrayList.cpp.
References Count.
Referenced by SparseConectivityMtxII::AddGrow(), SparseGridColumn::FindExistingBlockIndex(), MD_Qqraph::Insert(), and SortInsertIfNot().
void Clear | ( | ) |
long CountWithoutMask | ( | long * | ptr | ) |
Computes how many elements are not set in the mask.
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.
void Initialize | ( | ) |
Definition at line 143 of file IntArrayList.cpp.
References Count, Items, and memset().
Referenced by Alloc(), and DSSolver::LoadMCN().
void InitIdentity | ( | ) |
Definition at line 120 of file IntArrayList.cpp.
References Capacity, Count, and Items.
Referenced by SparseConectivityMtxII::Get_RecursiveBiSection(), and SparseConectivityMtxII::Get_Unity().
void Insert | ( | long | pos, | |
long | item | |||
) |
Definition at line 187 of file IntArrayList.cpp.
References Capacity, Array::Copy(), Count, and Items.
Referenced by SparseConectivityMtxII::AddGrow(), MD_Qqraph::Insert(), and SortInsertIfNot().
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.
ptr | Mask of which elements must be removed. |
Definition at line 315 of file IntArrayList.cpp.
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.
ptr | Mask of which elements must be removed. |
Definition at line 336 of file IntArrayList.cpp.
Referenced by MD_Qqraph::Eliminate().
void SetIndexesTo | ( | long * | ptr, | |
long | val | |||
) |
Sets items of a ptr* array using all indexes stored in this array.
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.
ptr | update items of this array |
Definition at line 288 of file IntArrayList.cpp.
void SortInsert | ( | long | item | ) |
Definition at line 153 of file IntArrayList.cpp.
References Capacity, Array::Copy(), Count, and Items.
Referenced by MD_Qqraph::Eliminate(), SparseConectivityMtxII::SparseConectivityMtxII(), and MD_Qqraph::SupervariablesDetection().
long SortInsertIfNot | ( | long | item | ) |
Definition at line 176 of file IntArrayList.cpp.
References BinarySearch(), and Insert().
long SumElements | ( | ) |
Sums all contained integers.
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.
void TrimToSize | ( | ) |
Definition at line 102 of file IntArrayList.cpp.
References Capacity, Array::Copy(), Count, and Items.
Referenced by MD_Qqraph::Eliminate().
long Capacity |
Definition at line 16 of file IntArrayList.h.
Referenced by Add(), AddRange(), Alloc(), Fill(), InitIdentity(), Insert(), IntArrayList(), SortInsert(), SparseConectivityMtxII::SparseConectivityMtxII(), and TrimToSize().
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().