11id : https://w3id.org/linkml/lib/arrays
22name : arrays
33title : LinkML Arrays
4- description : >-
4+ description : >-
55 LinkML templates for storing one-dimensional series, two-dimensional arrays,
66 and arrays of higher dimensionality.
77
88 Status: Experimental
99
1010 Note that this model is not intended to be imported directly. Instead,
1111 use `implements` to denote conformance.
12-
12+
1313status : testing
1414# contributors:
1515# - github:rly
@@ -39,13 +39,13 @@ classes:
3939 DataStructure :
4040 abstract : true
4141
42- Array :
42+ NDArray :
4343 description : >-
4444 a data structure consisting of a collection of *elements*, each identified by at least one array index tuple.
4545 abstract : true
4646 is_a : DataStructure
4747 slots :
48- - dimensionality
48+ - dimensions
4949 - elements
5050 - array_linearization_order
5151 slot_usage :
@@ -55,169 +55,72 @@ classes:
5555 an ordered sequence of values. The elements also have an *array interpretation*, where each
5656 element has a unique index which is determined by array_linearization_order
5757
58-
59- OneDimensionalSeries :
60- is_a : Array
61- description : >-
62- An array that has one dimension
63- aliases :
64- - axis
65- - 1D array
66- - vector
67- - series
68- - row
69- slots :
70- - series_label
71- - length
72- # TODO: consider offset and rate
73- slot_usage :
74- dimensionality :
75- equals_expression : " 1"
76-
77- TwoDimensionalArray :
78- is_a : Array
79- description : >-
80- An array that has two dimensions
81- aliases :
82- - table
83- - matrix
84- - grid
85- slots :
86- - axis0
87- - axis1
88- slot_usage :
89- dimensionality :
90- equals_expression : " 2"
91- elements :
92- description : >-
93- this will be serialized as one big long list that should be interpreted as a 2D array
94-
95- ThreeDimensionalArray :
96- is_a : Array
58+ DataArray :
9759 description : >-
98- An array that has two dimensions
99- aliases :
100- - 3D array
60+ a data structure containing an NDArray and a set of one-dimensional series that are used to label
61+ the elements of the array
62+ is_a : DataStructure
10163 slots :
102- - axis0
103- - axis1
104- - axis2
105- slot_usage :
106- dimensionality :
107- equals_expression : " 3"
64+ - axis
65+ - array
10866
109- OrderedArray :
67+ GroupingByArrayOrder :
11068 mixin : true
11169 description : >-
11270 A mixin that describes an array whose elements are mapped from a linear sequence to an array index
11371 via a specified mapping
114-
72+
11573 ColumnOrderedArray :
11674 mixin : true
75+ is_a : GroupingByArrayOrder
11776 description : >-
11877 An array ordering that is column-order
11978 slots :
12079 - array_linearization_order
12180 slot_usage :
12281 array_linearization_order :
12382 equals_string : COLUMN_MAJOR_ARRAY_ORDER
124-
83+
12584 RowOrderedArray :
12685 mixin : true
86+ is_a : GroupingByArrayOrder
12787 description : >-
12888 An array ordering that is row-order or generalizations thereof
12989 slots :
13090 - array_linearization_order
13191 slot_usage :
13292 array_linearization_order :
13393 equals_string : ROW_MAJOR_ARRAY_ORDER
134-
135- MultiDimensionalArray :
136- is_a : Array
137- abstract : true
138- description : >-
139- An array that has more than two dimensions
140-
141- ObjectAsTuple :
142- comments :
143- - not modeled as an array since this is used as a metaclass
144- implements :
145- - OneDimensionalSeries
146-
147- ArrayIndex :
148- is_a : ObjectAsTuple
14994
150- Operation :
151- abstract : true
152- description : >-
153- Represents the transformation of one or more inputs to one or more outputs determined by
154- zero to many operation parameters
155- slots :
156- - specified_input
157- - specified_output
158- - operation_parameters
159-
160- ArrayIndexOperation :
161- description : >-
162- An operation that takes as input an Array and is parameterized by an array index tuple and
163- yields an array element
164- slot_usage :
165- specified_input :
166- range : Array
167- maximum_cardinality : 1
168- specified_output :
169- range : Any
170- maximum_cardinality : 1
171- operation_parameters :
172- range : ArrayIndex
173- maximum_cardinality : 1
174-
17595slots :
176- dimensionality :
96+ dimensions :
17797 description : >-
17898 The number of elements in the tuple used to access elements of an array
17999 aliases :
180100 - rank
181- - dimension
101+ - dimensionality
182102 - number of axes
183103 - number of elements
184104 range : integer
185105 axis :
186- abstract : true
187- range : OneDimensionalSeries
106+ range : NDArray
107+ slot_usage :
108+ dimensions :
109+ equals_number : 1
188110 aliases :
189111 - dimension
190112 description : >-
191- A one dimensional series that contains elements that form one part of a tuple used to access an array
192- axis0 :
193- is_a : axis
194- aliases :
195- - dimension0
196- description : >-
197- An axis that is the zeroth index of the tuple used to access an array
198- range : OneDimensionalSeries
199- rank : 0
113+ A one-dimensional series that contains elements that form one part of a tuple used to access an array
200114 required : true
201- inlined : true
202- inlined_as_list : true
203- axis1 :
204- is_a : axis
115+ axis_index :
116+ range : integer
205117 description : >-
206- An axis that is the index after the zeroth of the tuple used to access an array
207- range : OneDimensionalSeries
208- rank : 1
209- required : true
210- inlined : true
211- inlined_as_list : true
212- axis2 :
213- is_a : axis
214- aliases :
215- - z
216- range : OneDimensionalSeries
217- rank : 2
118+ The position of an axis in a tuple used to access an array
119+ array :
120+ range : NDArray
121+ description : >-
122+ An array that is labeled by a set of one-dimensional series
218123 required : true
219- inlined : true
220- inlined_as_list : true
221124 elements :
222125 # this will be serialized as one big long list that should be interpreted as a 2D array
223126 range : Any
@@ -251,7 +154,7 @@ slots:
251154 operation_parameters :
252155 range : Any
253156 multivalued : true
254-
157+
255158enums :
256159 ArrayLinearizationOrderOptions :
257160 description : >-
@@ -272,5 +175,3 @@ enums:
272175 or any generalization thereof to dimensionality greater than 2
273176 aliases :
274177 - C order
275-
276-
0 commit comments