
Classes | |
| class | IIndex |
| Internal implementation of Index. More... | |
| class | IIterator |
| Iterates over all indices spanned by this Indices. More... | |
Public Member Functions | |
| boolean | isValid (Index i) |
| Check that i is valid for this Indices object. | |
| Iterator< Index > | iterator () |
| Returns an Iterator, that iterates over all indices spanned by this Indices object. | |
| int | numElements () |
| Returns the number of elements spanned by this Indices object. | |
| int | ndims () |
| Returns the number of dimensions spanned by this Indices object. | |
| Size | size () |
| Returns the size of this Indices object in each dimension. | |
| Index | translate (Index i) |
| Translates an Index to the corresponding Index in the underlying expression. | |
Static Public Member Functions | |
| static Indices | create (Size size) |
| Create an Indices object based on array sizes. | |
| static Indices | createFromFas (FArraySubscripts fas) |
| Create an Indices object based on FArraySubcripts. | |
| static Indices | createFromFas (ArrayList< FArraySubscripts > fasl) |
| Create an Indices object based on a list of FArraySubcripts. | |
| static Indices | create (ArrayList< int[]> ind) |
| Create an Indices object based on a list of int arrays. | |
| static Indices | create (Iterable<?extends CommonForIndex > forIndices) |
| Create an Indices object based on a list of CommonForIndexes. | |
Protected Member Functions | |
| Indices (Size size) | |
| Internal constructor to create an Indices object based on array sizes. | |
| int | internal (Index i) |
| Calculate the internal index in an Array that spans this Indices. | |
Protected Attributes | |
| int | ndims |
| Size | size |
| int | hash |
| A perfect hash for all Indices that have consecutive indicies, ndims <= 3 and size[i] <= 1023 for 0 <= i < ndims. | |
Only supports indices of the form (1..n1, 1..n2, ... , 1..nk). See NonConsecutiveIndices.
New Indices objects should be created with the create() methods. The subclass used is selected automatically.
The Indices class is typically used to iterate over all possible indices of an array access of declaration. class :0
| org.jmodelica.modelica.compiler.Indices.Indices | ( | Size | size | ) | [protected] |
Internal constructor to create an Indices object based on array sizes.
| static Indices org.jmodelica.modelica.compiler.Indices.create | ( | Iterable<?extends CommonForIndex > | forIndices | ) | [static] |
Create an Indices object based on a list of CommonForIndexes.
| static Indices org.jmodelica.modelica.compiler.Indices.create | ( | ArrayList< int[]> | ind | ) | [static] |
Create an Indices object based on a list of int arrays.
Create an Indices object based on array sizes.
| static Indices org.jmodelica.modelica.compiler.Indices.createFromFas | ( | ArrayList< FArraySubscripts > | fasl | ) | [static] |
Create an Indices object based on a list of FArraySubcripts.
Reimplemented in org.jmodelica.modelica.compiler.NonConsecutiveIndices.
| static Indices org.jmodelica.modelica.compiler.Indices.createFromFas | ( | FArraySubscripts | fas | ) | [static] |
Create an Indices object based on FArraySubcripts.
Reimplemented in org.jmodelica.modelica.compiler.NonConsecutiveIndices.
| int org.jmodelica.modelica.compiler.Indices.internal | ( | Index | i | ) | [protected] |
| boolean org.jmodelica.modelica.compiler.Indices.isValid | ( | Index | i | ) |
Check that i is valid for this Indices object.
| Iterator<Index> org.jmodelica.modelica.compiler.Indices.iterator | ( | ) |
Returns an Iterator, that iterates over all indices spanned by this Indices object.
Returns the number of dimensions spanned by this Indices object.
| int org.jmodelica.modelica.compiler.Indices.numElements | ( | ) |
Returns the number of elements spanned by this Indices object.
Returns the size of this Indices object in each dimension.
Translates an Index to the corresponding Index in the underlying expression.
Default implementation always returns i.
Reimplemented in org.jmodelica.modelica.compiler.NonConsecutiveIndices.
int org.jmodelica.modelica.compiler.Indices.hash [protected] |
int org.jmodelica.modelica.compiler.Indices.ndims [protected] |
Size org.jmodelica.modelica.compiler.Indices.size [protected] |
1.5.8