View Javadoc
1   package org.djunits.value.vdouble.vector;
2   
3   import org.djunits.unit.DimensionlessUnit;
4   import org.djunits.value.function.DimensionlessFunctions;
5   import org.djunits.value.vdouble.function.DoubleMathFunctions;
6   import org.djunits.value.vdouble.scalar.Dimensionless;
7   import org.djunits.value.vdouble.vector.base.AbstractDoubleVectorRel;
8   import org.djunits.value.vdouble.vector.data.DoubleVectorData;
9   
10  import jakarta.annotation.Generated;
11  
12  /**
13   * Double DimensionlessVector, a vector of values with a DimensionlessUnit.
14   * <p>
15   * Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
16   * BSD-style license. See <a href="https://djunits.org/docs/license.html">DJUNITS License</a>.
17   * </p>
18   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
19   * @author <a href="https://www.tudelft.nl/staff/p.knoppers/">Peter Knoppers</a>
20   */
21  @Generated(value = "org.djunits.generator.GenerateDJUNIT", date = "2023-04-30T13:59:27.633664900Z")
22  public class DimensionlessVector extends AbstractDoubleVectorRel<DimensionlessUnit, Dimensionless, DimensionlessVector>
23          implements DoubleMathFunctions, DimensionlessFunctions<DimensionlessUnit, DimensionlessVector>
24  {
25      /** */
26      private static final long serialVersionUID = 20190905L;
27  
28      /**
29       * Construct an DimensionlessVector from an internal data object.
30       * @param data DoubleVectorData; the internal data object for the vector data
31       * @param displayUnit DimensionlessUnit; the display unit of the vector data
32       */
33      public DimensionlessVector(final DoubleVectorData data, final DimensionlessUnit displayUnit)
34      {
35          super(data, displayUnit);
36      }
37  
38      /** {@inheritDoc} */
39      @Override
40      public Class<Dimensionless> getScalarClass()
41      {
42          return Dimensionless.class;
43      }
44  
45      /** {@inheritDoc} */
46      @Override
47      public DimensionlessVector instantiateVector(final DoubleVectorData dvd, final DimensionlessUnit displayUnit)
48      {
49          return new DimensionlessVector(dvd, displayUnit);
50      }
51  
52      /** {@inheritDoc} */
53      @Override
54      public Dimensionless instantiateScalarSI(final double valueSI, final DimensionlessUnit displayUnit)
55      {
56          Dimensionless result = Dimensionless.instantiateSI(valueSI);
57          result.setDisplayUnit(displayUnit);
58          return result;
59      }
60  
61      /** {@inheritDoc} */
62      @Override
63      public final DimensionlessVector acos()
64      {
65          assign(DoubleMathFunctions.ACOS);
66          return this;
67      }
68  
69      /** {@inheritDoc} */
70      @Override
71      public final DimensionlessVector asin()
72      {
73          assign(DoubleMathFunctions.ASIN);
74          return this;
75      }
76  
77      /** {@inheritDoc} */
78      @Override
79      public final DimensionlessVector atan()
80      {
81          assign(DoubleMathFunctions.ATAN);
82          return this;
83      }
84  
85      /** {@inheritDoc} */
86      @Override
87      public final DimensionlessVector cbrt()
88      {
89          assign(DoubleMathFunctions.CBRT);
90          return this;
91      }
92  
93      /** {@inheritDoc} */
94      @Override
95      public final DimensionlessVector cos()
96      {
97          assign(DoubleMathFunctions.COS);
98          return this;
99      }
100 
101     /** {@inheritDoc} */
102     @Override
103     public final DimensionlessVector cosh()
104     {
105         assign(DoubleMathFunctions.COSH);
106         return this;
107     }
108 
109     /** {@inheritDoc} */
110     @Override
111     public final DimensionlessVector exp()
112     {
113         assign(DoubleMathFunctions.EXP);
114         return this;
115     }
116 
117     /** {@inheritDoc} */
118     @Override
119     public final DimensionlessVector expm1()
120     {
121         assign(DoubleMathFunctions.EXPM1);
122         return this;
123     }
124 
125     /** {@inheritDoc} */
126     @Override
127     public final DimensionlessVector log()
128     {
129         assign(DoubleMathFunctions.LOG);
130         return this;
131     }
132 
133     /** {@inheritDoc} */
134     @Override
135     public final DimensionlessVector log10()
136     {
137         assign(DoubleMathFunctions.LOG10);
138         return this;
139     }
140 
141     /** {@inheritDoc} */
142     @Override
143     public final DimensionlessVector log1p()
144     {
145         assign(DoubleMathFunctions.LOG1P);
146         return this;
147     }
148 
149     /** {@inheritDoc} */
150     @Override
151     public final DimensionlessVector pow(final double x)
152     {
153         assign(DoubleMathFunctions.POW((float) x));
154         return this;
155     }
156 
157     /** {@inheritDoc} */
158     @Override
159     public final DimensionlessVector signum()
160     {
161         assign(DoubleMathFunctions.SIGNUM);
162         return this;
163     }
164 
165     /** {@inheritDoc} */
166     @Override
167     public final DimensionlessVector sin()
168     {
169         assign(DoubleMathFunctions.SIN);
170         return this;
171     }
172 
173     /** {@inheritDoc} */
174     @Override
175     public final DimensionlessVector sinh()
176     {
177         assign(DoubleMathFunctions.SINH);
178         return this;
179     }
180 
181     /** {@inheritDoc} */
182     @Override
183     public final DimensionlessVector sqrt()
184     {
185         assign(DoubleMathFunctions.SQRT);
186         return this;
187     }
188 
189     /** {@inheritDoc} */
190     @Override
191     public final DimensionlessVector tan()
192     {
193         assign(DoubleMathFunctions.TAN);
194         return this;
195     }
196 
197     /** {@inheritDoc} */
198     @Override
199     public final DimensionlessVector tanh()
200     {
201         assign(DoubleMathFunctions.TANH);
202         return this;
203     }
204 
205     /** {@inheritDoc} */
206     @Override
207     public final DimensionlessVector inv()
208     {
209         assign(DoubleMathFunctions.INV);
210         return this;
211     }
212 
213 }