IGLib
1.5
The IGLib base library for development of numerical, technical and business applications.
|
Interface for 1d grid generators. More...
Public Member Functions | |
void | ClearResults () |
Clears the results of grid generation (releases internal structures). The Calculated flag is set to false. More... | |
void | CalculateGrid (ref List< double > nodeList) |
Performs grid generation and stores the generated nodes directly on the provided list. Unless necessary due to nature of generation, results are not stored internally on the current grid generator object. Because of this, the Calculated flag is normally not set after calling this function. WARNING: This method generates a gid even if it has already been generated and is up to date. More... | |
void | CalculateGrid (ref List< double > nodeList, ref List< double > intervalLengthsList) |
Performs grid generation and stores the generated nodes and intervals between them directly on the provided lists. Unless necessary due to nature of generation, results are not stored internally on the current grid generator object. Because of this, the Calculated flag is normally not set after calling this function. WARNING: This method generates a grid even if it has already been generated and is up to date. More... | |
void | CalculateGrid () |
Performs grid generation according to current settings. The generated grid is stored in internal structures of the generator, from where it can be readily copied (e.g. by GetNodeTable() or by GetNodeList()), used in some other way (e.g. by GetIntervalLengthsList) or just referenced (e.g. by GetNodeListReference()). If the grid has already been generated and it is up to date (according to parameters of the generator) then the grid is not re-calculated. More... | |
double | GetNode (int which) |
Returns the specified node of the generated grid. If necessary, grid is generated first in order to obtain the correct data. More... | |
void | GetNodeTable (ref double[] result) |
Stores the node positions of the generated 1D grid into the specified table. If necessary, grid is generated first in order to obtain the correct data. More... | |
double[] | GetNodeTable () |
Returns a table containing 1D node positions. A copy of list of node positions is always created and returned, therefore it is guaranteed that this table will not be used by some other object related to the grid generator. If necessary, grid is generated first in order to obtain the correct data. More... | |
void | GetNodeList (ref List< double > result) |
Stores the node positions of the generated 1D grid into the specified list. If necessary, grid is generated first in order to obtain the correct data. More... | |
List< double > | GetNodeList () |
Returns a list containing 1D node positions. A copy of list of node positions is always created and returned, therefore it is guaranteed that this table will not be used by some other object related to the grid generator. If necessary, grid is generated first in order to obtain the correct data. More... | |
List< double > | GetNodeListReference () |
Returns a list containing generated 1D node positions. This method can return a reference to the internal list containing the generated node coordinated. This means that any future generation or other operation performed by the generator can override list contents. In order to use contents of the list thread safely, enclose this method call and all subsequent operations you will perform on the returned list of generated nodes, within a lock((...).Lock){ ... } block. If necessary, grid is generated first in order to obtain the correct data. More... | |
void | GetIntervalLengthsTable (ref double[] result) |
Stores a table of interval lengths between the generated nodes into the specified array. If necessary, grid is generated first in order to obtain the correct data. More... | |
double[] | GetIntervalLengthsTable () |
Generates and returns a table of interval lengths between the generated nodes. The returned table is a copy that will not be overridden by further operations on the grid generator. If necessary, grid is generated first in order to obtain the correct data. More... | |
void | GetIntervalLengthsList (ref List< double > result) |
Stores a table of interval lengths between the generated nodes into the specified list. If necessary, grid is generated first in order to obtain the correct data. More... | |
List< double > | GetIntervalLengthsList () |
Generates and returns a list of interval lengths between the generated nodes. The returned list is a copy that will not be overridden by further operations on the grid generator. If necessary, grid is generated first in order to obtain the correct data. More... | |
double | GetIntervalLength (int i) |
Returns the length of the specified interval between generated nodes of the grid. If necessary, grid is generated first in order to obtain the correct data. More... | |
Properties | |
double | CoordinateFirst [get, set] |
Gets or sets coordinate of the first generated node (usually the minimal generated coordinate). More... | |
double | CoordinateLast [get, set] |
Gets or sets coordinate of the last generated node (usually the maximal generated coordinate). More... | |
int | NumNodes [get, set] |
Gets or sets teh number of nodes to be generated. More... | |
int | NumIntervals [get] |
Gets the number of intervals between the nodes. Simply NumNodes-1. More... | |
bool | Calculated [get] |
Flag indicating whether the grid is generated ready to use. If true then node positions are contained in an internal structure, such that they can be obtained simply by copying this structure (i.e. no need for re-calculation). REMARK: If you intend to do something with results on basis of the value of this flag, don't forget to enclose checking of the flag and your operation into the lock(....Lock){ ... } block. More... | |
![]() | |
object | Lock [get] |
Interface for 1d grid generators.
List(double) is usually a primary data sturcture for storing nodes, therefore methods returning reference to this are more efficient.
$A Igor Dec10;
void IG.Num.IGridGenerator1d.ClearResults | ( | ) |
Clears the results of grid generation (releases internal structures). The Calculated flag is set to false.
Implemented in IG.Num.GridGenerator1dBase.
void IG.Num.IGridGenerator1d.CalculateGrid | ( | ref List< double > | nodeList | ) |
Performs grid generation and stores the generated nodes directly on the provided list. Unless necessary due to nature of generation, results are not stored internally on the current grid generator object. Because of this, the Calculated flag is normally not set after calling this function. WARNING: This method generates a gid even if it has already been generated and is up to date.
nodeList | A list where node coordinates are stored. List is allocated or re-allocated if necessary. |
Implemented in IG.Num.GridGenerator1dBase, IG.Num.GridGenerator1d, and IG.Num.GridGenerator1dFunc.
void IG.Num.IGridGenerator1d.CalculateGrid | ( | ref List< double > | nodeList, |
ref List< double > | intervalLengthsList | ||
) |
Performs grid generation and stores the generated nodes and intervals between them directly on the provided lists. Unless necessary due to nature of generation, results are not stored internally on the current grid generator object. Because of this, the Calculated flag is normally not set after calling this function. WARNING: This method generates a grid even if it has already been generated and is up to date.
nodeList | A list where positions of the generated grid are stored. |
intervalLengthsList | A list where lengths of intervals between grid nodes are stored. |
Implemented in IG.Num.GridGenerator1dBase.
void IG.Num.IGridGenerator1d.CalculateGrid | ( | ) |
Performs grid generation according to current settings. The generated grid is stored in internal structures of the generator, from where it can be readily copied (e.g. by GetNodeTable() or by GetNodeList()), used in some other way (e.g. by GetIntervalLengthsList) or just referenced (e.g. by GetNodeListReference()). If the grid has already been generated and it is up to date (according to parameters of the generator) then the grid is not re-calculated.
Implemented in IG.Num.GridGenerator1dBase.
double IG.Num.IGridGenerator1d.GetNode | ( | int | which | ) |
Returns the specified node of the generated grid. If necessary, grid is generated first in order to obtain the correct data.
which | Specifies which node (counted from 0) is to be returned. |
Implemented in IG.Num.GridGenerator1dBase.
void IG.Num.IGridGenerator1d.GetNodeTable | ( | ref double[] | result | ) |
Stores the node positions of the generated 1D grid into the specified table. If necessary, grid is generated first in order to obtain the correct data.
result | Table where node positions of the generated grid are stored. Allocated or relocated if necessary. |
Implemented in IG.Num.GridGenerator1dBase.
double [] IG.Num.IGridGenerator1d.GetNodeTable | ( | ) |
Returns a table containing 1D node positions. A copy of list of node positions is always created and returned, therefore it is guaranteed that this table will not be used by some other object related to the grid generator. If necessary, grid is generated first in order to obtain the correct data.
Implemented in IG.Num.GridGenerator1dBase.
void IG.Num.IGridGenerator1d.GetNodeList | ( | ref List< double > | result | ) |
Stores the node positions of the generated 1D grid into the specified list. If necessary, grid is generated first in order to obtain the correct data.
result | List where node positions of the generated grid are stored. Allocated or relocated if necessary. |
Implemented in IG.Num.GridGenerator1dBase.
List<double> IG.Num.IGridGenerator1d.GetNodeList | ( | ) |
Returns a list containing 1D node positions. A copy of list of node positions is always created and returned, therefore it is guaranteed that this table will not be used by some other object related to the grid generator. If necessary, grid is generated first in order to obtain the correct data.
Implemented in IG.Num.GridGenerator1dBase.
List<double> IG.Num.IGridGenerator1d.GetNodeListReference | ( | ) |
Returns a list containing generated 1D node positions. This method can return a reference to the internal list containing the generated node coordinated. This means that any future generation or other operation performed by the generator can override list contents. In order to use contents of the list thread safely, enclose this method call and all subsequent operations you will perform on the returned list of generated nodes, within a lock((...).Lock){ ... } block. If necessary, grid is generated first in order to obtain the correct data.
Implemented in IG.Num.GridGenerator1dBase.
void IG.Num.IGridGenerator1d.GetIntervalLengthsTable | ( | ref double[] | result | ) |
Stores a table of interval lengths between the generated nodes into the specified array. If necessary, grid is generated first in order to obtain the correct data.
result | Table where interval lengths between nodes of the generated grid are stored. Allocated or relocated if necessary. |
Implemented in IG.Num.GridGenerator1dBase.
double [] IG.Num.IGridGenerator1d.GetIntervalLengthsTable | ( | ) |
Generates and returns a table of interval lengths between the generated nodes. The returned table is a copy that will not be overridden by further operations on the grid generator. If necessary, grid is generated first in order to obtain the correct data.
Implemented in IG.Num.GridGenerator1dBase.
void IG.Num.IGridGenerator1d.GetIntervalLengthsList | ( | ref List< double > | result | ) |
Stores a table of interval lengths between the generated nodes into the specified list. If necessary, grid is generated first in order to obtain the correct data.
result | List where interval lengths between nodes of the generated grid are stored. Allocated or relocated if necessary. |
Implemented in IG.Num.GridGenerator1dBase.
List<double> IG.Num.IGridGenerator1d.GetIntervalLengthsList | ( | ) |
Generates and returns a list of interval lengths between the generated nodes. The returned list is a copy that will not be overridden by further operations on the grid generator. If necessary, grid is generated first in order to obtain the correct data.
Implemented in IG.Num.GridGenerator1dBase.
double IG.Num.IGridGenerator1d.GetIntervalLength | ( | int | i | ) |
Returns the length of the specified interval between generated nodes of the grid. If necessary, grid is generated first in order to obtain the correct data.
i | Consecutive number of the interval between nodes. |
Implemented in IG.Num.GridGenerator1dBase.
|
getset |
Gets or sets coordinate of the first generated node (usually the minimal generated coordinate).
|
getset |
Gets or sets coordinate of the last generated node (usually the maximal generated coordinate).
|
getset |
Gets or sets teh number of nodes to be generated.
|
get |
Gets the number of intervals between the nodes. Simply NumNodes-1.
|
get |
Flag indicating whether the grid is generated ready to use. If true then node positions are contained in an internal structure, such that they can be obtained simply by copying this structure (i.e. no need for re-calculation). REMARK: If you intend to do something with results on basis of the value of this flag, don't forget to enclose checking of the flag and your operation into the lock(....Lock){ ... } block.