IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.

IG::Lib::IndexList Class Reference

Index list, a sorted list of unique integer indices. Used for tasks such as filtering specified element from a list of elements or a general data set. More...

Inheritance diagram for IG::Lib::IndexList:
Collaboration diagram for IG::Lib::IndexList:

List of all members.

Public Member Functions

 IndexList ()
 Creates an empty index table with the default capacity.
 IndexList (int initialCapacity)
 Creates an empty index table with the specified initial capacity.
 IndexList (params int[] items)
 Creates an index table containing all indices from the specified table.
 IndexList (IList< int > items)
 Creates an index table containing all indices from the specified list.
 IndexList (ICollection< int > items)
 Creates an index table containing all indices from the specified collection.

Static Public Member Functions

static IndexList CreateRandomPermutation (int length)
 Creates and returns a random permutation of the specified length.
static IndexList CreateRandomPermutation (IRandomGenerator rand, int length)
 Creates and returns a random permutation of the specified length by using the specified random generator.
static void SetRandomPermutation (int length, int upperBound, ref IndexList indices)
 Creates a random permutation of the specified length and stores them it the specified index list.
static void SetRandomPermutation (IRandomGenerator rand, int length, ref IndexList indices)
 Creates a random permutation of the specified length by using the specified random generator.
static IndexList CreateRandom (int length, int upperBound)
 Creates a prescribed number of unique random indices in the specified range.
static IndexList CreateRandom (int length, int lowerBound, int upperBound)
 Creates and returns an index list with the specified number of unique random indices in the specified range .
static IndexList CreateRandom (IRandomGenerator rand, int length, int upperBound)
 Creates and returns an index list with the specified number of unique random indices in the specified range by using the specified random generator. Lower bound of generated indices is 0.
static IndexList CreateRandom (IRandomGenerator rand, int length, int lowerBound, int upperBound)
 Creates and returns an index list with the specified number of unique random indices in the specified range by using the specified random generator.
static void SetRandom (int length, int upperBound, ref IndexList indices)
 Creates a prescribed number of unique random indices in the specified range.
static void SetRandom (int length, int lowerBound, int upperBound, ref IndexList indices)
 Creates a prescribed number of unique random indices in the specified range.
static void SetRandom (IRandomGenerator rand, int length, int upperBound, ref IndexList indices)
 Creates a prescribed number of unique random indices in the specified range by using the specified random generator and stores them in the specified index list. Lower bound of generated indices is 0.
static void SetRandom (IRandomGenerator rand, int length, int lowerBound, int upperBound, ref IndexList indices)
 Creates a prescribed number of unique random indices in the specified range by using the specified random generator and stores them in the specified index list.

Detailed Description

Index list, a sorted list of unique integer indices. Used for tasks such as filtering specified element from a list of elements or a general data set.

$A Igor Dec08;


Constructor & Destructor Documentation

IG::Lib::IndexList::IndexList ( ) [inline]

Creates an empty index table with the default capacity.

IG::Lib::IndexList::IndexList ( int  initialCapacity) [inline]

Creates an empty index table with the specified initial capacity.

Parameters:
initialCapacityInitial capacity of the list.
IG::Lib::IndexList::IndexList ( params int[]  items) [inline]

Creates an index table containing all indices from the specified table.

Parameters:
itemsTable fo indices that are added to the created index table.
IG::Lib::IndexList::IndexList ( IList< int >  items) [inline]

Creates an index table containing all indices from the specified list.

Parameters:
itemsList fo indices that are added to the created index table.
IG::Lib::IndexList::IndexList ( ICollection< int >  items) [inline]

Creates an index table containing all indices from the specified collection.

Parameters:
itemsCollection fo indices that are added to the created index table.

Member Function Documentation

static IndexList IG::Lib::IndexList::CreateRandomPermutation ( int  length) [inline, static]

Creates and returns a random permutation of the specified length.

Parameters:
lengthLength of permutation, i.e. number of random indices contained in the generated list of indices.
static IndexList IG::Lib::IndexList::CreateRandomPermutation ( IRandomGenerator  rand,
int  length 
) [inline, static]

Creates and returns a random permutation of the specified length by using the specified random generator.

Parameters:
randRandom numbers generator used to generate indices randomly. There is a version of the method without this argument, which uses the global random generator.
lengthLength of permutation, i.e. number of random indices contained in the generated list of indices.
static void IG::Lib::IndexList::SetRandomPermutation ( int  length,
int  upperBound,
ref IndexList  indices 
) [inline, static]

Creates a random permutation of the specified length and stores them it the specified index list.

Parameters:
lengthNumber of random indices contained in the generated list of indices.
indicesIndex list to which the generated indices are stored.
static void IG::Lib::IndexList::SetRandomPermutation ( IRandomGenerator  rand,
int  length,
ref IndexList  indices 
) [inline, static]

Creates a random permutation of the specified length by using the specified random generator.

Parameters:
randRandom numbers generator used to generate indices randomly. There is a version of the method without this argument, which uses the global random generator.
lengthNumber of random indices contained in the generated list of indices.
indicesIndex list to which the generated indices are stored.
static IndexList IG::Lib::IndexList::CreateRandom ( int  length,
int  upperBound 
) [inline, static]

Creates a prescribed number of unique random indices in the specified range.

Parameters:
lengthNumber of random indices contained in the generated list of indices.
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
static IndexList IG::Lib::IndexList::CreateRandom ( int  length,
int  lowerBound,
int  upperBound 
) [inline, static]

Creates and returns an index list with the specified number of unique random indices in the specified range .

Parameters:
lengthNumber of random indices contained in the generated list of indices.
lowerBoundLower bound for generated indices (contained indices are greater or equal to this value).
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
static IndexList IG::Lib::IndexList::CreateRandom ( IRandomGenerator  rand,
int  length,
int  upperBound 
) [inline, static]

Creates and returns an index list with the specified number of unique random indices in the specified range by using the specified random generator. Lower bound of generated indices is 0.

Parameters:
randRandom numbers generator used to generate indices randomly. There is a version of the method without this argument, which uses the global random generator.
lengthNumber of random indices contained in the generated list of indices.
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
static IndexList IG::Lib::IndexList::CreateRandom ( IRandomGenerator  rand,
int  length,
int  lowerBound,
int  upperBound 
) [inline, static]

Creates and returns an index list with the specified number of unique random indices in the specified range by using the specified random generator.

Parameters:
randRandom numbers generator used to generate indices randomly. There is a version of the method without this argument, which uses the global random generator.
lengthNumber of random indices contained in the generated list of indices.
lowerBoundLower bound for generated indices (contained indices are greater or equal to this value).
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
static void IG::Lib::IndexList::SetRandom ( int  length,
int  upperBound,
ref IndexList  indices 
) [inline, static]

Creates a prescribed number of unique random indices in the specified range.

Parameters:
lengthNumber of random indices contained in the generated list of indices.
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
indicesIndex list to which the generated indices are stored.
static void IG::Lib::IndexList::SetRandom ( int  length,
int  lowerBound,
int  upperBound,
ref IndexList  indices 
) [inline, static]

Creates a prescribed number of unique random indices in the specified range.

Parameters:
lengthNumber of random indices contained in the generated list of indices.
lowerBoundLower bound for generated indices (contained indices are greater or equal to this value).
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
indicesIndex list to which the generated indices are stored.
static void IG::Lib::IndexList::SetRandom ( IRandomGenerator  rand,
int  length,
int  upperBound,
ref IndexList  indices 
) [inline, static]

Creates a prescribed number of unique random indices in the specified range by using the specified random generator and stores them in the specified index list. Lower bound of generated indices is 0.

Parameters:
randRandom numbers generator used to generate indices randomly. There is a version of the method without this argument, which uses the global random generator.
lengthNumber of random indices contained in the generated list of indices.
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
indicesIndex list to which the generated indices are stored.
static void IG::Lib::IndexList::SetRandom ( IRandomGenerator  rand,
int  length,
int  lowerBound,
int  upperBound,
ref IndexList  indices 
) [inline, static]

Creates a prescribed number of unique random indices in the specified range by using the specified random generator and stores them in the specified index list.

Parameters:
randRandom numbers generator used to generate indices randomly. There is a version of the method without this argument, which uses the global random generator.
lengthNumber of random indices contained in the generated list of indices.
lowerBoundLower bound for generated indices (contained indices are greater or equal to this value).
upperBoundUpper bound for generated indices (contained indices are lesser or equal to this value).
indicesIndex list to which the generated indices are stored.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties Events