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

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
IG.Num.VectorStore< T > Class Template Reference

Vector store. More...

Inheritance diagram for IG.Num.VectorStore< T >:
[legend]
Collaboration diagram for IG.Num.VectorStore< T >:
[legend]

## Public Member Functions
| VectorStore (int length)
| Constructs a new Vector store for vectors with the specified dimensions. More...
| VectorStore (int length, bool constrainDimensions)
| Constructs a new Vector store for vectors with the specified dimensions. More...
override bool | IsEligible (T vec)
| Returns true if the specified Vector is eligible for storage in the current store, false if not. More...
Public Member Functions inherited from IG.Lib.ObjectStore< T >
virtual bool | TryStore (T obj)
| Stores the specified object if the object is eligible for storage in this store and if The maximal number of stored object will not be exceeded. More...
bool | StoreEligible (T obj)
| Stores the specified object in the store. WARNING: Throws ArgumentException if the specified object is not eligible for storing in this store. If the maximum number of objects would be exceeded then nothing happens. More...
T | TryGet ()
| Returns an object from this object store, or null if it is not possible to provide an eligible object. If the store contains no objects, it tries to create and return a new eligible object. Should not throw an exception. More...
T | TryGetStored ()
| Returns the last object from this object store, or null if there are no objects on it. Dose not attempt to create a new object. More...
T | GetEligible ()
| Returns a non-null object that is eligible for storing in this object store. If the store itself does not contain any objects, an object is created anew, or exception is thrown if this is not possible. IMPORTANT: TryGet returns an object or null if the object can not be returned (does not throw an exception), and TryGetStored returns an eligible object only if any are stored, otherwise returns null. More...

## Protected Member Functions
| VectorStore ()
| Constructs a new Vector store of unspecified dimensions. More...
Protected Member Functions inherited from IG.Lib.ObjectStore< T >
virtual void | ClearIneligible ()
| Removes ineligible obects from the list. More...
virtual String | NotEligibleMessage (object obj)
| Returns a message indicating why the specified object is not eligible for storage in the current store. More...
virtual T | TryGetNew ()
| Returns a newly created object eligible for storage, or null if such an object can not be created. This method should not throw an exception. More...
T | GetNew ()
| Returns a newly xreated object eligible for storage in this object store. Exception is thrown if such an object can not be created. More...

## Protected Attributes
bool | _constrainDimensions = true
| Ilf true then only vectors with matching dimensions are eligible for storing. More...
int | _length
Protected Attributes inherited from IG.Lib.ObjectStore< T >
object | _lock = new object()
List< T > | _objects = new List<T>()

## Properties
bool | ConstrainDimensions`[get, set]`
| Ilf true then only vectors with matching dimensions are eligible for storing. More...
int | Length`[get, set]`
| Dimension for vectors to be stored. More...
Properties inherited from IG.Lib.ObjectStore< T >
object | Lock`[get]`
int | Count`[get, protected set]`
| Gets the current number of objects. More...
int | MaxCount`[get, set]`
| Gets or sets the maximal number of objects that can be stored by this object store. More...
Properties inherited from IG.Lib.IObjectStore< T >
int | Count`[get]`
| Gets the current number of objects. More...
int | MaxCount`[get, set]`
| Gets or sets the maximal number of objects that can be stored by this object store. More...
Properties inherited from IG.Lib.ILockable
object | Lock`[get]`

## Detailed Description

Vector store.

Stores Vector objects for reuse.

Can be used for storage fo vectors with specific dimension (default) or for torage of any non-null vectors.

Template Parameters

  T |

Type Constraints

  T | : | class |
  T | : | IVector |

## Constructor & Destructor Documentation

IG.Num.VectorStore< T >.VectorStore | ( |  | ) |
| inline protected

Constructs a new Vector store of unspecified dimensions.

IG.Num.VectorStore< T >.VectorStore | ( | int | length | ) |
| inline

Constructs a new Vector store for vectors with the specified dimensions.

Parameters

  length | Dimension of stored vectors.

IG.Num.VectorStore< T >.VectorStore | ( | int | length,
|  | bool | constrainDimensions
| ) |  |
| inline

Constructs a new Vector store for vectors with the specified dimensions.

If

Parameters

  constrainDimensions |

is false then store can be used for vectors with any dimensions.

Parameters

  length | Dimension of stored vectors.

## Member Function Documentation

override bool IG.Num.VectorStore< T >.IsEligible | ( | T | vec | ) |
| inline virtual

Returns true if the specified Vector is eligible for storage in the current store, false if not.

Parameters

  vec | Vector whose eligibility is checked.

Reimplemented from IG.Lib.ObjectStore< T >.

## Member Data Documentation

bool IG.Num.VectorStore< T >._constrainDimensions = true
| protected

Ilf true then only vectors with matching dimensions are eligible for storing.

Default is true.

int IG.Num.VectorStore< T >._length
| protected

## Property Documentation

bool IG.Num.VectorStore< T >.ConstrainDimensions
| get set

Ilf true then only vectors with matching dimensions are eligible for storing.

int IG.Num.VectorStore< T >.Length
| get set

Dimension for vectors to be stored.

If ConstrainDimensions is true then only vectors that match dimensions are eligible for storage. Otherwise, dimensions are only important for creation of new vectors.

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

- igbase/numeric/VectorBase.cs