1 package org.djunits.value.vfloat.matrix;
2
3 import java.util.Collection;
4
5 import org.djunits.unit.DimensionlessUnit;
6 import org.djunits.value.function.DimensionlessFunctions;
7 import org.djunits.value.storage.StorageType;
8 import org.djunits.value.vfloat.function.FloatMathFunctions;
9 import org.djunits.value.vfloat.matrix.base.FloatMatrixRel;
10 import org.djunits.value.vfloat.matrix.base.FloatSparseValue;
11 import org.djunits.value.vfloat.matrix.data.FloatMatrixData;
12 import org.djunits.value.vfloat.scalar.FloatDimensionless;
13 import org.djunits.value.vfloat.vector.FloatDimensionlessVector;
14 import org.djunits.value.vfloat.vector.data.FloatVectorData;
15
16 import jakarta.annotation.Generated;
17
18
19
20
21
22
23
24
25
26
27 @Generated(value = "org.djunits.generator.GenerateDJUNIT", date = "2023-07-23T14:06:38.224104100Z")
28 public class FloatDimensionlessMatrix
29 extends FloatMatrixRel<DimensionlessUnit, FloatDimensionless, FloatDimensionlessVector, FloatDimensionlessMatrix>
30 implements DimensionlessFunctions<DimensionlessUnit, FloatDimensionlessMatrix>
31 {
32
33 private static final long serialVersionUID = 20151109L;
34
35
36
37
38
39
40 public FloatDimensionlessMatrix(final FloatMatrixData data, final DimensionlessUnit displayUnit)
41 {
42 super(data, displayUnit);
43 }
44
45
46
47
48
49
50
51
52
53
54 public FloatDimensionlessMatrix(final float[][] data, final DimensionlessUnit displayUnit, final StorageType storageType)
55 {
56 this(FloatMatrixData.instantiate(data, displayUnit.getScale(), storageType), displayUnit);
57 }
58
59
60
61
62
63
64
65 public FloatDimensionlessMatrix(final float[][] data, final DimensionlessUnit displayUnit)
66 {
67 this(data, displayUnit, StorageType.DENSE);
68 }
69
70
71
72
73
74
75 public FloatDimensionlessMatrix(final float[][] data, final StorageType storageType)
76 {
77 this(data, DimensionlessUnit.SI, storageType);
78 }
79
80
81
82
83
84
85 public FloatDimensionlessMatrix(final float[][] data)
86 {
87 this(data, StorageType.DENSE);
88 }
89
90
91
92
93
94
95
96
97
98
99
100 public FloatDimensionlessMatrix(final FloatDimensionless[][] data, final DimensionlessUnit displayUnit,
101 final StorageType storageType)
102 {
103 this(FloatMatrixData.instantiate(data, storageType), displayUnit);
104 }
105
106
107
108
109
110
111
112
113 public FloatDimensionlessMatrix(final FloatDimensionless[][] data, final DimensionlessUnit displayUnit)
114 {
115 this(data, displayUnit, StorageType.DENSE);
116 }
117
118
119
120
121
122
123
124
125 public FloatDimensionlessMatrix(final FloatDimensionless[][] data, final StorageType storageType)
126 {
127 this(data, DimensionlessUnit.SI, storageType);
128 }
129
130
131
132
133
134
135
136 public FloatDimensionlessMatrix(final FloatDimensionless[][] data)
137 {
138 this(data, StorageType.DENSE);
139 }
140
141
142
143
144
145
146
147
148
149
150
151
152 public FloatDimensionlessMatrix(final Collection<FloatSparseValue<DimensionlessUnit, FloatDimensionless>> data,
153 final DimensionlessUnit displayUnit, final int rows, final int cols, final StorageType storageType)
154 {
155 this(FloatMatrixData.instantiate(data, rows, cols, storageType), displayUnit);
156 }
157
158
159
160
161
162
163
164
165
166
167 public FloatDimensionlessMatrix(final Collection<FloatSparseValue<DimensionlessUnit, FloatDimensionless>> data,
168 final DimensionlessUnit displayUnit, final int rows, final int cols)
169 {
170 this(data, displayUnit, rows, cols, StorageType.SPARSE);
171 }
172
173
174
175
176
177
178
179
180
181
182 public FloatDimensionlessMatrix(final Collection<FloatSparseValue<DimensionlessUnit, FloatDimensionless>> data,
183 final int rows, final int cols, final StorageType storageType)
184 {
185 this(data, DimensionlessUnit.SI, rows, cols, storageType);
186 }
187
188
189
190
191
192
193
194
195
196 public FloatDimensionlessMatrix(final Collection<FloatSparseValue<DimensionlessUnit, FloatDimensionless>> data,
197 final int rows, final int cols)
198 {
199 this(data, DimensionlessUnit.SI, rows, cols, StorageType.SPARSE);
200 }
201
202 @Override
203 public Class<FloatDimensionless> getScalarClass()
204 {
205 return FloatDimensionless.class;
206 }
207
208 @Override
209 public Class<FloatDimensionlessVector> getVectorClass()
210 {
211 return FloatDimensionlessVector.class;
212 }
213
214 @Override
215 public FloatDimensionlessMatrix instantiateMatrix(final FloatMatrixData fmd, final DimensionlessUnit displayUnit)
216 {
217 return new FloatDimensionlessMatrix(fmd, displayUnit);
218 }
219
220 @Override
221 public FloatDimensionlessVector instantiateVector(final FloatVectorData fvd, final DimensionlessUnit displayUnit)
222 {
223 return new FloatDimensionlessVector(fvd, displayUnit);
224 }
225
226 @Override
227 public FloatDimensionless instantiateScalarSI(final float valueSI, final DimensionlessUnit displayUnit)
228 {
229 FloatDimensionless result = FloatDimensionless.instantiateSI(valueSI);
230 result.setDisplayUnit(displayUnit);
231 return result;
232 }
233
234 @Override
235 public final FloatDimensionlessMatrix acos()
236 {
237 assign(FloatMathFunctions.ACOS);
238 return this;
239 }
240
241 @Override
242 public final FloatDimensionlessMatrix asin()
243 {
244 assign(FloatMathFunctions.ASIN);
245 return this;
246 }
247
248 @Override
249 public final FloatDimensionlessMatrix atan()
250 {
251 assign(FloatMathFunctions.ATAN);
252 return this;
253 }
254
255 @Override
256 public final FloatDimensionlessMatrix cbrt()
257 {
258 assign(FloatMathFunctions.CBRT);
259 return this;
260 }
261
262 @Override
263 public final FloatDimensionlessMatrix cos()
264 {
265 assign(FloatMathFunctions.COS);
266 return this;
267 }
268
269 @Override
270 public final FloatDimensionlessMatrix cosh()
271 {
272 assign(FloatMathFunctions.COSH);
273 return this;
274 }
275
276 @Override
277 public final FloatDimensionlessMatrix exp()
278 {
279 assign(FloatMathFunctions.EXP);
280 return this;
281 }
282
283 @Override
284 public final FloatDimensionlessMatrix expm1()
285 {
286 assign(FloatMathFunctions.EXPM1);
287 return this;
288 }
289
290 @Override
291 public final FloatDimensionlessMatrix log()
292 {
293 assign(FloatMathFunctions.LOG);
294 return this;
295 }
296
297 @Override
298 public final FloatDimensionlessMatrix log10()
299 {
300 assign(FloatMathFunctions.LOG10);
301 return this;
302 }
303
304 @Override
305 public final FloatDimensionlessMatrix log1p()
306 {
307 assign(FloatMathFunctions.LOG1P);
308 return this;
309 }
310
311 @Override
312 public final FloatDimensionlessMatrix pow(final double x)
313 {
314 assign(FloatMathFunctions.POW((float) x));
315 return this;
316 }
317
318 @Override
319 public final FloatDimensionlessMatrix signum()
320 {
321 assign(FloatMathFunctions.SIGNUM);
322 return this;
323 }
324
325 @Override
326 public final FloatDimensionlessMatrix sin()
327 {
328 assign(FloatMathFunctions.SIN);
329 return this;
330 }
331
332 @Override
333 public final FloatDimensionlessMatrix sinh()
334 {
335 assign(FloatMathFunctions.SINH);
336 return this;
337 }
338
339 @Override
340 public final FloatDimensionlessMatrix sqrt()
341 {
342 assign(FloatMathFunctions.SQRT);
343 return this;
344 }
345
346 @Override
347 public final FloatDimensionlessMatrix tan()
348 {
349 assign(FloatMathFunctions.TAN);
350 return this;
351 }
352
353 @Override
354 public final FloatDimensionlessMatrix tanh()
355 {
356 assign(FloatMathFunctions.TANH);
357 return this;
358 }
359
360 @Override
361 public final FloatDimensionlessMatrix inv()
362 {
363 assign(FloatMathFunctions.INV);
364 return this;
365 }
366
367 }