Skip to content

Commit

Permalink
Trying to clarify array introduction - covering all cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Oct 3, 2023
1 parent a430496 commit 6701069
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions chapters/arrays.tex
@@ -1,12 +1,10 @@
\chapter{Arrays}\label{arrays}

A non-record array can be regarded as a collection of type compatible values, \cref{type-compatible-expressions}.
An array of records may contain scalar record values whose elements differ in their dimension sizes, but apart from that they must be of the same type.
An array of the specialized classes type, record, and connector can be regarded as a collection of type compatible values, \cref{type-compatible-expressions}.
Thus an array of the specialized classes record or connector may contain scalar values whose elements differ in their dimension sizes, but apart from that they must be of the same type.
Such heterogenous arrays may only be used completely, sliced as specified, or indexed.
An array of arrays must have the same dimension sizes for all of the arrays (with the same exception for records).
Modelica arrays can be multidimensional and are ``rectangular'',
which in the case of matrices has the consequence that all rows in a
matrix have equal length, and all columns have equal length.
An array of other specialized classes can only be used sliced as specified, or indexed.
Modelica arrays can be multidimensional and are ``rectangular'', which in the case of matrices has the consequence that all rows in a matrix have equal length, and all columns have equal length.

Each array has a certain dimensionality, i.e., number of dimensions.
The degenerate case of a \firstuse{scalar} variable is not really an array, but can be regarded as an array with zero dimensions.
Expand Down

0 comments on commit 6701069

Please sign in to comment.