
Public Member Functions | |
| Index (int[] ind) | |
Construct an Index representing the indices given in ind. | |
| int[] | index () |
| Returns the indices that specify this cell. | |
| int | ndims () |
| Returns the number of dimensions of this Index. | |
| int | first () |
| Returns the index for the first dimension. | |
| int | last () |
| Returns the index for the last dimension. | |
| int | get (int i) |
Returns the index for the ith dimension (zero-based). | |
| void | set (int i, int index) |
Sets the index for the ith dimension (zero-based). | |
| boolean | equals (Object i) |
| Compare two Index for equality. | |
| int | hashCode () |
| Calculate hash code. | |
| Index | subIndex (int level) |
Creates a new Index that describes the last ndims() - level dimensions of this Index. | |
| Index | adjusted (int dim, int adj, int ndims) |
Creates a new Index that is a copy of this Index, but with adj added to dimension dim and promoted to ndims dimensions by adding ones to the end. | |
| FArraySubscripts | createFArraySubscripts () |
| Create a new FArraySubscripts object describing this index. | |
| Index | clone () |
| Copies this Index. | |
| Index | expand (Index i) |
Return an Index that is the result of appending i to this Index. | |
| String | toString () |
| Return a string representation on the form "[i1, i2, i3]". | |
| String | toUnclosedString () |
| Return a string representation on the form "i1, i2, i3". | |
| int | internal (Indices ind) |
| Return the internal index in an Array of the cell this Index refers to. | |
Static Public Attributes | |
| static final Index | NULL = new Index(0) |
| static Index | expanded = NULL |
Protected Member Functions | |
| Index () | |
| Construct an empty Index. | |
| Index (int ndims) | |
| Construct an Index of ndims dimensions, pointing at the spot before the first cell. | |
Protected Attributes | |
| int[] | index |
Index objects are reused to a high degree. Always use clone() when retaining an Index object. class :0
| org.jmodelica.modelica.compiler.Index.Index | ( | int[] | ind | ) |
Construct an Index representing the indices given in ind.
| org.jmodelica.modelica.compiler.Index.Index | ( | ) | [protected] |
Construct an empty Index.
| org.jmodelica.modelica.compiler.Index.Index | ( | int | ndims | ) | [protected] |
Construct an Index of ndims dimensions, pointing at the spot before the first cell.
| Index org.jmodelica.modelica.compiler.Index.adjusted | ( | int | dim, | |
| int | adj, | |||
| int | ndims | |||
| ) |
| Index org.jmodelica.modelica.compiler.Index.clone | ( | ) |
| FArraySubscripts org.jmodelica.modelica.compiler.Index.createFArraySubscripts | ( | ) |
Create a new FArraySubscripts object describing this index.
| boolean org.jmodelica.modelica.compiler.Index.equals | ( | Object | i | ) |
Compare two Index for equality.
| int org.jmodelica.modelica.compiler.Index.first | ( | ) |
Returns the index for the first dimension.
| int org.jmodelica.modelica.compiler.Index.get | ( | int | i | ) |
Returns the index for the ith dimension (zero-based).
| int org.jmodelica.modelica.compiler.Index.hashCode | ( | ) |
Calculate hash code.
Creates perfect hash when ndims() <= 3 and all indices are <= 1023.
| int [] org.jmodelica.modelica.compiler.Index.index | ( | ) |
Returns the indices that specify this cell.
| int org.jmodelica.modelica.compiler.Index.internal | ( | Indices | ind | ) |
Return the internal index in an Array of the cell this Index refers to.
Only for use from Array.
| indices | the indices to resolve the internal index with |
Reimplemented in org.jmodelica.modelica.compiler.Indices.Indices.IIndex.
| int org.jmodelica.modelica.compiler.Index.last | ( | ) |
Returns the index for the last dimension.
| int org.jmodelica.modelica.compiler.Index.ndims | ( | ) |
Returns the number of dimensions of this Index.
| void org.jmodelica.modelica.compiler.Index.set | ( | int | i, | |
| int | index | |||
| ) |
Sets the index for the ith dimension (zero-based).
| Index org.jmodelica.modelica.compiler.Index.subIndex | ( | int | level | ) |
| String org.jmodelica.modelica.compiler.Index.toString | ( | ) |
Return a string representation on the form "[i1, i2, i3]".
| String org.jmodelica.modelica.compiler.Index.toUnclosedString | ( | ) |
Return a string representation on the form "i1, i2, i3".
int [] org.jmodelica.modelica.compiler.Index.index [protected] |
final Index org.jmodelica.modelica.compiler.Index.NULL = new Index(0) [static] |
1.5.8