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