org.jmodelica.modelica.compiler.NonConsecutiveIndices Class Reference

NonConsecutiveIndices describes a set of array indices that isn't limited to 1. More...

Inheritance diagram for org.jmodelica.modelica.compiler.NonConsecutiveIndices:

org.jmodelica.modelica.compiler.Indices

List of all members.

Public Member Functions

Index translate (Index i)
 Translates an Index to the corresponding Index in the underlying expression.

Static Public Member Functions

static NonConsecutiveIndices createFromFas (FArraySubscripts fas)
 Create a NonConsecutiveIndices object based on FArraySubcripts.
static NonConsecutiveIndices createFromFas (ArrayList< FArraySubscripts > fasl)
 Create a NonConsecutiveIndices object based on a list of FArraySubcripts.
static NonConsecutiveIndices create (ArrayList< int[]> ind, boolean trim)
 Create a NonConsecutiveIndices object based on a list of int arrays Use Indices.create(ArrayList<int[]> ind).

Protected Member Functions

 NonConsecutiveIndices (ArrayList< int[]> ind, boolean[] trim)
 Internal constructor to create a NonConsecutiveIndices object based on a list of int arrays containing the used indexes on the underlying array.

Static Protected Member Functions

static Size getSize (ArrayList< int[]> ind, boolean[] trim)
 Calculate size for this indices from a list of int arrays containing the used indexes on the underlying array.

Protected Attributes

ArrayList< int[]> indices
Index trans
boolean[] trim


Detailed Description

NonConsecutiveIndices describes a set of array indices that isn't limited to 1.

.n.

For example, consider the declaration Real x[4,4,4] and the access x[:,1,1:2:4]. The array indices for the declaration is then {1,2,3,4}, {1,2,3,4}, and {1,2,3,4} respectively for the three dimensions. For the access, we have {1,2,3,4}, {1} and {1,3} respectively. The access will have size [4,2], and this class will handle the necessary translations between indices. class :0


Constructor & Destructor Documentation

org.jmodelica.modelica.compiler.NonConsecutiveIndices.NonConsecutiveIndices ( ArrayList< int[]>  ind,
boolean[]  trim 
) [protected]

Internal constructor to create a NonConsecutiveIndices object based on a list of int arrays containing the used indexes on the underlying array.

Parameters:
trim the dimensions to remove.


Member Function Documentation

static NonConsecutiveIndices org.jmodelica.modelica.compiler.NonConsecutiveIndices.create ( ArrayList< int[]>  ind,
boolean  trim 
) [static]

Create a NonConsecutiveIndices object based on a list of int arrays Use Indices.create(ArrayList<int[]> ind).

Parameters:
trim remove dimensions that only span one index.

static NonConsecutiveIndices org.jmodelica.modelica.compiler.NonConsecutiveIndices.createFromFas ( ArrayList< FArraySubscripts fasl  )  [static]

Create a NonConsecutiveIndices object based on a list of FArraySubcripts.

Use Indices.create(ArrayList<FArraySubscripts> fasl).

Reimplemented from org.jmodelica.modelica.compiler.Indices.

static NonConsecutiveIndices org.jmodelica.modelica.compiler.NonConsecutiveIndices.createFromFas ( FArraySubscripts  fas  )  [static]

Create a NonConsecutiveIndices object based on FArraySubcripts.

Use Indices.create(FArraySubscripts fas).

Reimplemented from org.jmodelica.modelica.compiler.Indices.

static Size org.jmodelica.modelica.compiler.NonConsecutiveIndices.getSize ( ArrayList< int[]>  ind,
boolean[]  trim 
) [static, protected]

Calculate size for this indices from a list of int arrays containing the used indexes on the underlying array.

Index org.jmodelica.modelica.compiler.NonConsecutiveIndices.translate ( Index  i  ) 

Translates an Index to the corresponding Index in the underlying expression.

Reimplemented from org.jmodelica.modelica.compiler.Indices.


Member Data Documentation


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

Generated on Fri Oct 7 14:51:02 2011 for JModelica.org by  doxygen 1.5.8