IGLib
1.5
The IGLib base library for development of numerical, technical and business applications.
|
Public Member Functions | |
MatrixStore (int rowCount, int columnCount) | |
Constructs a new matrix store for matrices with the specified dimensions. More... | |
MatrixStore (int rowCount, int columnCount, bool constrainDimensions) | |
Constructs a new matrix store for matrices with the specified dimensions. More... | |
override bool | IsEligible (T mat) |
Returns true if the specified matrix is eligible for storage in the current store, false if not. More... | |
![]() | |
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 | |
MatrixStore () | |
Constructs a new matrix store of unspecified dimensions. More... | |
![]() | |
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 matrices with matching dimensions are eligible for storing. More... | |
int | _rowCount |
![]() | |
object | _lock = new object() |
List< T > | _objects = new List<T>() |
Properties | |
bool | ConstrainDimensions [get, set] |
Ilf true then only matrices with matching dimensions are eligible for storing. More... | |
int | RowCount [get, set] |
Number of rows for matrices to be stored. More... | |
int | ColumnCount [get, set] |
Number of columns for matrices to be stored. More... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
object | Lock [get] |
Private Attributes | |
int | _columnCount |
Matrix store.
Stores matrix objects for reuse.
Can be used for storage fo matrices with specific dimension (default) or for torage of any non-null matrices.
T |
T | : | class | |
T | : | IMatrix |
|
inlineprotected |
Constructs a new matrix store of unspecified dimensions.
|
inline |
Constructs a new matrix store for matrices with the specified dimensions.
rowCount | Number of rows of stored matrices. |
columnCount | Number of columns of stored matrices. |
|
inline |
Constructs a new matrix store for matrices with the specified dimensions.
If
constrainDimensions |
is false then store can be used for matrices with any dimensions.
rowCount | Number of rows of stored matrices. |
columnCount | Number of columns of stored matrices. |
|
inlinevirtual |
Returns true if the specified matrix is eligible for storage in the current store, false if not.
mat | Matrix whose eligibility is checked. |
Reimplemented from IG.Lib.ObjectStore< T >.
|
protected |
Ilf true then only matrices with matching dimensions are eligible for storing.
Default is true.
|
protected |
|
private |
|
getset |
Ilf true then only matrices with matching dimensions are eligible for storing.
|
getset |
Number of rows for matrices to be stored.
If ConstrainDimensions is true then only matrices that match dimensions are eligible for storage. Otherwise, dimensions are only important for creation of new matrices.
|
getset |
Number of columns for matrices to be stored.
If ConstrainDimensions is true then only matrices that match dimensions are eligible for storage. Otherwise, dimensions are only important for creation of new matrices.