| File |
Line |
| org/djunits/vecmat/storage/DenseFloatDataSi.java |
242 |
| org/djunits/vecmat/storage/DenseFloatDataSi.java |
273 |
public static <Q extends Quantity<Q>> DenseFloatDataSi of(final double[][] gridInUnit, final UnitInterface<Q> unit)
{
Throw.whenNull(gridInUnit, "gridInUnit");
Throw.whenNull(unit, "unit");
Throw.when(gridInUnit.length == 0, IllegalArgumentException.class, "Number of rows in the data matrix = 0");
int rows = gridInUnit.length;
Throw.whenNull(gridInUnit[0], "gridInUnit[0] = null");
int cols = gridInUnit[0].length;
float[] dataSi = new float[rows * cols];
for (int r = 0; r < rows; r++)
{
Throw.whenNull(gridInUnit[r], "gridInUnit[%d] = null", r);
Throw.when(gridInUnit[r].length != cols, IllegalArgumentException.class,
"Number of columns in row %d (%d) is not equal to number of columns in row 0 (%d)", r, gridInUnit[r].length,
cols);
for (int c = 0; c < cols; c++)
{
dataSi[r * cols + c] = (float) unit.toBaseValue(gridInUnit[r][c]);
}
}
return new DenseFloatDataSi(dataSi, rows, cols);
}
/**
* Instantiate a data object with a float[rows][cols]. A safe copy of the data is stored.
* @param gridInUnit the data as a double[][] array in row-major format, expressed in the given unit
* @param unit the unit of the data
* @return a dense float data object with SI values for vectors, matrices and tables
* @throws IllegalArgumentException when the size of the data object is not equal to rows*cols
* @param <Q> the quantity type
*/
public static <Q extends Quantity<Q>> DenseFloatDataSi of(final float[][] gridInUnit, final UnitInterface<Q> unit) |
| File |
Line |
| org/djunits/vecmat/def/AbsVectorMatrix.java |
149 |
| org/djunits/vecmat/def/Table.java |
278 |
}
/**
* Check if the 0-based row is within bounds.
* @param row the 0-based row to check
* @throws IndexOutOfBoundsException when row is out of bounds
*/
protected void checkRow(final int row)
{
Throw.when(row < 0 || row >= rows(), IndexOutOfBoundsException.class, "Row %d out of bounds [0..%d]", row, rows() - 1);
}
/**
* Check if the 0-based column is within bounds.
* @param col the 0-based column to check
* @throws IndexOutOfBoundsException when column is out of bounds
*/
protected void checkCol(final int col)
{
Throw.when(col < 0 || col >= cols(), IndexOutOfBoundsException.class, "Column %d out of bounds [0..%d]", col,
cols() - 1);
}
/**
* Check if the 1-based row is within bounds.
* @param mRow the 1-based row to check
* @throws IndexOutOfBoundsException when row is out of bounds
*/
protected void mcheckRow(final int mRow)
{
Throw.when(mRow < 1 || mRow > rows(), IndexOutOfBoundsException.class, "Row %d out of bounds [1..%d]", mRow, rows());
}
/**
* Check if the 1-based column is within bounds.
* @param mCol the 1-based column to check
* @throws IndexOutOfBoundsException when column is out of bounds
*/
protected void mcheckCol(final int mCol)
{
Throw.when(mCol < 1 || mCol > cols(), IndexOutOfBoundsException.class, "Column %d out of bounds [1..%d]", mCol, cols());
} |
| File |
Line |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
89 |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
159 |
public SparseDoubleDataSi(final double[][] denseData)
{
Throw.whenNull(denseData, "denseData");
Throw.when(denseData.length == 0, IllegalArgumentException.class, "Number of rows in the data matrix = 0");
this.rows = denseData.length;
this.cols = denseData[0].length;
for (int r = 1; r < this.rows; r++)
Throw.when(denseData[r].length != this.cols, IllegalArgumentException.class,
"Number of columns in row %d (%d) is not equal to number of columns in row 0 (%d)", r, denseData[r].length,
this.cols);
storeSparse(denseData);
}
/**
* Instantiate a data object with one array in row-major format. Note that a safe copy of the data is stored.
* @param sparseData the sparse data in row-major format
* @param indexes the indexes with the data coordinates, where index = row * cols() + col (0-based)
* @param rows the number of rows
* @param cols the number of columns
* @throws IllegalArgumentException when the size of the data object is not equal to rows*cols, or when the number of rows
* or columns is not positive, or when indexes is not in strictly increasing order
* @throws IndexOutOfBoundsException when one of the entries in indexes is out of bounds
* @param <Q> the quantity type
*/
@SuppressWarnings("checkstyle:needbraces")
public <Q extends Quantity<Q>> SparseDoubleDataSi(final Q[] sparseData, final int[] indexes, final int rows, final int cols) |
| File |
Line |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
48 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
48 |
protected SparseDoubleDataSi(final double[] sparseData, final int[] indexes, final int rows, final int cols)
{
Throw.whenNull(sparseData, "sparseData");
Throw.whenNull(indexes, "indexes");
Throw.when(rows <= 0, IllegalArgumentException.class, "Number of rows <= 0");
Throw.when(cols <= 0, IllegalArgumentException.class, "Number of columns <= 0");
Throw.when(sparseData.length != indexes.length, IllegalArgumentException.class,
"sparseData array (%d) has different length from indexes array (%d)", sparseData.length, indexes.length);
this.rows = rows;
this.cols = cols;
checkIndexes(indexes);
this.sparseData = sparseData;
this.indexes = indexes;
}
/**
* Instantiate a data object with one array in row-major format. Note that NO safe copy of the data is stored.
* @param denseData the dense data in row-major format
* @param rows the number of rows
* @param cols the number of columns
* @throws IllegalArgumentException when the size of the data object is not equal to rows*cols, or when the number of rows
* or columns is not positive
*/
public SparseDoubleDataSi(final double[] denseData, final int rows, final int cols) |
| File |
Line |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
89 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
128 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
198 |
public SparseDoubleDataSi(final double[][] denseData)
{
Throw.whenNull(denseData, "denseData");
Throw.when(denseData.length == 0, IllegalArgumentException.class, "Number of rows in the data matrix = 0");
this.rows = denseData.length;
this.cols = denseData[0].length;
for (int r = 1; r < this.rows; r++)
Throw.when(denseData[r].length != this.cols, IllegalArgumentException.class,
"Number of columns in row %d (%d) is not equal to number of columns in row 0 (%d)", r, denseData[r].length,
this.cols);
storeSparse(denseData);
}
/**
* Instantiate a data object with one array in row-major format. Note that a safe copy of the data is stored.
* @param sparseData the sparse data in row-major format
* @param indexes the indexes with the data coordinates, where index = row * cols() + col (0-based)
* @param rows the number of rows
* @param cols the number of columns
* @throws IllegalArgumentException when the size of the data object is not equal to rows*cols, or when the number of rows
* or columns is not positive, or when indexes is not in strictly increasing order
* @throws IndexOutOfBoundsException when one of the entries in indexes is out of bounds
* @param <Q> the quantity type
*/
@SuppressWarnings("checkstyle:needbraces")
public <Q extends Quantity<Q>> SparseDoubleDataSi(final Q[] sparseData, final int[] indexes, final int rows, final int cols) |
| File |
Line |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
114 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
153 |
public <Q extends Quantity<Q>> SparseDoubleDataSi(final Q[] sparseData, final int[] indexes, final int rows, final int cols)
{
Throw.whenNull(sparseData, "sparseData");
Throw.whenNull(indexes, "indexes");
Throw.when(rows <= 0, IllegalArgumentException.class, "Number of rows <= 0");
Throw.when(cols <= 0, IllegalArgumentException.class, "Number of columns <= 0");
Throw.when(sparseData.length != indexes.length, IllegalArgumentException.class,
"sparseData array (%d) has different length from indexes array (%d)", sparseData.length, indexes.length);
this.rows = rows;
this.cols = cols;
checkIndexes(indexes);
this.sparseData = new double[sparseData.length]; |
| File |
Line |
| org/djunits/quantity/Angle.java |
282 |
| org/djunits/quantity/AngularAcceleration.java |
228 |
| org/djunits/quantity/AngularVelocity.java |
198 |
grad.deriveUnit("cds", "c\"", "centesimal arcsecond", 1.0 / 10000.0, UnitSystem.OTHER, null);
/**
* Create a new Angle unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Angle ofSi(final double si, final UnitInterface<Angle> displayUnit) |
| File |
Line |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
89 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
109 |
public SparseDoubleDataSi(final double[][] denseData)
{
Throw.whenNull(denseData, "denseData");
Throw.when(denseData.length == 0, IllegalArgumentException.class, "Number of rows in the data matrix = 0");
this.rows = denseData.length;
this.cols = denseData[0].length;
for (int r = 1; r < this.rows; r++)
Throw.when(denseData[r].length != this.cols, IllegalArgumentException.class,
"Number of columns in row %d (%d) is not equal to number of columns in row 0 (%d)", r, denseData[r].length,
this.cols);
storeSparse(denseData);
}
/**
* Instantiate a data object with one array in row-major format. Note that a safe copy of the data is stored.
* @param sparseData the sparse data in row-major format
* @param indexes the indexes with the data coordinates, where index = row * cols() + col (0-based)
* @param rows the number of rows
* @param cols the number of columns
* @throws IllegalArgumentException when the size of the data object is not equal to rows*cols, or when the number of rows
* or columns is not positive, or when indexes is not in strictly increasing order
* @throws IndexOutOfBoundsException when one of the entries in indexes is out of bounds
* @param <Q> the quantity type
*/
@SuppressWarnings("checkstyle:needbraces")
public <Q extends Quantity<Q>> SparseDoubleDataSi(final Q[] sparseData, final int[] indexes, final int rows, final int cols) |
| File |
Line |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
48 |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
114 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
48 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
153 |
protected SparseDoubleDataSi(final double[] sparseData, final int[] indexes, final int rows, final int cols)
{
Throw.whenNull(sparseData, "sparseData");
Throw.whenNull(indexes, "indexes");
Throw.when(rows <= 0, IllegalArgumentException.class, "Number of rows <= 0");
Throw.when(cols <= 0, IllegalArgumentException.class, "Number of columns <= 0");
Throw.when(sparseData.length != indexes.length, IllegalArgumentException.class,
"sparseData array (%d) has different length from indexes array (%d)", sparseData.length, indexes.length);
this.rows = rows;
this.cols = cols;
checkIndexes(indexes);
this.sparseData = sparseData; |
| File |
Line |
| org/djunits/vecmat/storage/SparseDoubleDataSi.java |
140 |
| org/djunits/vecmat/storage/SparseFloatDataSi.java |
179 |
public <Q extends Quantity<Q>> SparseDoubleDataSi(final Q[] denseData, final int rows, final int cols)
{
Throw.whenNull(denseData, "denseData");
Throw.when(rows <= 0, IllegalArgumentException.class, "Number of rows <= 0");
Throw.when(cols <= 0, IllegalArgumentException.class, "Number of columns <= 0");
Throw.when(denseData.length != rows * cols, IllegalArgumentException.class,
"denseData.length (%d) != rows x cols (%d x %d)", denseData.length, rows, cols);
this.rows = rows;
this.cols = cols;
storeSparse(denseData);
}
/**
* Instantiate a data object with a dense double[rows][cols]. A sparse, safe copy of the data is stored.
* @param denseData the data in row-major format as a double[][]
* @throws IllegalArgumentException when the data matrix is ragged
* @param <Q> the quantity type
*/
@SuppressWarnings("checkstyle:needbraces")
public <Q extends Quantity<Q>> SparseDoubleDataSi(final Q[][] denseData) |
| File |
Line |
| org/djunits/quantity/Angle.java |
282 |
| org/djunits/quantity/Frequency.java |
259 |
| org/djunits/quantity/Illuminance.java |
202 |
| org/djunits/quantity/Length.java |
385 |
grad.deriveUnit("cds", "c\"", "centesimal arcsecond", 1.0 / 10000.0, UnitSystem.OTHER, null);
/**
* Create a new Angle unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Angle ofSi(final double si, final UnitInterface<Angle> displayUnit) |
| File |
Line |
| org/djunits/quantity/AngularAcceleration.java |
228 |
| org/djunits/quantity/Frequency.java |
259 |
| org/djunits/quantity/Illuminance.java |
202 |
| org/djunits/quantity/Length.java |
385 |
"centesimal arcsecond per second squared", 1.0 / 10000.0, UnitSystem.OTHER, null);
/**
* Create a new AngularAcceleration unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public AngularAcceleration ofSi(final double si, final UnitInterface<AngularAcceleration> displayUnit) |
| File |
Line |
| org/djunits/quantity/AngularVelocity.java |
198 |
| org/djunits/quantity/Frequency.java |
259 |
| org/djunits/quantity/Illuminance.java |
202 |
| org/djunits/quantity/Length.java |
385 |
grad_s.deriveUnit("cds/s", "c\"/s", "centesimal arcsecond per second", 1.0 / 10000.0, UnitSystem.OTHER, null);
/**
* Create a new AngularVelocity unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public AngularVelocity ofSi(final double si, final UnitInterface<AngularVelocity> displayUnit) |
| File |
Line |
| org/djunits/quantity/ElectricCurrent.java |
247 |
| org/djunits/quantity/ElectricPotential.java |
230 |
| org/djunits/quantity/ElectricalResistance.java |
237 |
public static final ElectricCurrent.Unit abA = A.deriveUnit("abA", "abA", "abampere", 10.0, UnitSystem.CGS_EMU, null);
/**
* Create a new ElectricCurrent unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public ElectricCurrent ofSi(final double si, final UnitInterface<ElectricCurrent> displayUnit) |
| File |
Line |
| org/djunits/quantity/ElectricalInductance.java |
176 |
| org/djunits/quantity/LuminousIntensity.java |
186 |
public static final ElectricalInductance.Unit SI = (Unit) H.generateSiPrefixes(false, false);
/**
* Create a new ElectricalInductance unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public ElectricalInductance ofSi(final double si, final UnitInterface<ElectricalInductance> displayUnit) |
| File |
Line |
| org/djunits/quantity/Energy.java |
366 |
| org/djunits/quantity/Power.java |
309 |
public static final Energy.Unit erg = J.deriveUnit("erg", "erg", 1.0E-7, UnitSystem.CGS);
/**
* Create a new Energy unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Energy ofSi(final double si, final UnitInterface<Energy> displayUnit) |
| File |
Line |
| org/djunits/quantity/EquivalentDose.java |
186 |
| org/djunits/quantity/MagneticFlux.java |
249 |
| org/djunits/quantity/MagneticFluxDensity.java |
199 |
public static final EquivalentDose.Unit rem = Sv.deriveUnit("rem", "rem", "rem", 0.01, UnitSystem.CGS, null);
/**
* Create a new EquivalentDose unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public EquivalentDose ofSi(final double si, final UnitInterface<EquivalentDose> displayUnit) |
| File |
Line |
| org/djunits/quantity/Force.java |
278 |
| org/djunits/quantity/Pressure.java |
254 |
public static final Force.Unit sn = SI.deriveUnit("sn", "sthene", 1000.0, UnitSystem.MTS);
/**
* Create a new Force unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Force ofSi(final double si, final UnitInterface<Force> displayUnit) |
| File |
Line |
| org/djunits/quantity/AbsorbedDose.java |
188 |
| org/djunits/quantity/Acceleration.java |
262 |
| org/djunits/quantity/Energy.java |
366 |
| org/djunits/quantity/Power.java |
309 |
public static final AbsorbedDose.Unit rad = new AbsorbedDose.Unit("rad", "rad", 1.0E-2, UnitSystem.CGS);
/**
* Create a new AbsorbedDose unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public AbsorbedDose ofSi(final double si, final UnitInterface<AbsorbedDose> displayUnit) |
| File |
Line |
| org/djunits/quantity/Area.java |
336 |
| org/djunits/quantity/LinearObjectDensity.java |
257 |
| org/djunits/quantity/Torque.java |
265 |
new Area.Unit("ac", "acre", Length.Unit.CONST_MI * Length.Unit.CONST_MI / 640.0, UnitSystem.IMPERIAL);
/**
* Create a new Area unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Area ofSi(final double si, final UnitInterface<Area> displayUnit) |
| File |
Line |
| org/djunits/quantity/Duration.java |
331 |
| org/djunits/quantity/Mass.java |
308 |
| org/djunits/quantity/RadioActivity.java |
205 |
| org/djunits/quantity/Speed.java |
346 |
| org/djunits/quantity/Volume.java |
344 |
public static final Duration.Unit wk = day.deriveUnit("wk", "week", 7.0, UnitSystem.OTHER);
/**
* Create a new Duration unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Duration ofSi(final double si, final UnitInterface<Duration> displayUnit) |
| File |
Line |
| org/djunits/quantity/Angle.java |
282 |
| org/djunits/quantity/ElectricCurrent.java |
247 |
| org/djunits/quantity/ElectricPotential.java |
230 |
| org/djunits/quantity/ElectricalResistance.java |
237 |
| org/djunits/quantity/EquivalentDose.java |
186 |
| org/djunits/quantity/FlowMass.java |
247 |
| org/djunits/quantity/Frequency.java |
259 |
| org/djunits/quantity/Illuminance.java |
202 |
| org/djunits/quantity/Length.java |
385 |
| org/djunits/quantity/MagneticFlux.java |
249 |
| org/djunits/quantity/MagneticFluxDensity.java |
199 |
| org/djunits/quantity/SolidAngle.java |
187 |
grad.deriveUnit("cds", "c\"", "centesimal arcsecond", 1.0 / 10000.0, UnitSystem.OTHER, null);
/**
* Create a new Angle unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Angle ofSi(final double si, final UnitInterface<Angle> displayUnit) |
| File |
Line |
| org/djunits/quantity/AngularAcceleration.java |
228 |
| org/djunits/quantity/ElectricCurrent.java |
247 |
| org/djunits/quantity/ElectricPotential.java |
230 |
| org/djunits/quantity/ElectricalResistance.java |
237 |
| org/djunits/quantity/EquivalentDose.java |
186 |
| org/djunits/quantity/FlowMass.java |
247 |
| org/djunits/quantity/MagneticFlux.java |
249 |
| org/djunits/quantity/MagneticFluxDensity.java |
199 |
| org/djunits/quantity/SolidAngle.java |
187 |
"centesimal arcsecond per second squared", 1.0 / 10000.0, UnitSystem.OTHER, null);
/**
* Create a new AngularAcceleration unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public AngularAcceleration ofSi(final double si, final UnitInterface<AngularAcceleration> displayUnit) |
| File |
Line |
| org/djunits/quantity/AngularVelocity.java |
198 |
| org/djunits/quantity/ElectricCurrent.java |
247 |
| org/djunits/quantity/ElectricPotential.java |
230 |
| org/djunits/quantity/ElectricalResistance.java |
237 |
| org/djunits/quantity/EquivalentDose.java |
186 |
| org/djunits/quantity/FlowMass.java |
247 |
| org/djunits/quantity/MagneticFlux.java |
249 |
| org/djunits/quantity/MagneticFluxDensity.java |
199 |
| org/djunits/quantity/SolidAngle.java |
187 |
grad_s.deriveUnit("cds/s", "c\"/s", "centesimal arcsecond per second", 1.0 / 10000.0, UnitSystem.OTHER, null);
/**
* Create a new AngularVelocity unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public AngularVelocity ofSi(final double si, final UnitInterface<AngularVelocity> displayUnit) |
| File |
Line |
| org/djunits/quantity/AbsorbedDose.java |
188 |
| org/djunits/quantity/AmountOfSubstance.java |
206 |
| org/djunits/quantity/Angle.java |
282 |
| org/djunits/quantity/AngularAcceleration.java |
228 |
| org/djunits/quantity/AngularVelocity.java |
198 |
| org/djunits/quantity/Area.java |
336 |
| org/djunits/quantity/CatalyticActivity.java |
217 |
| org/djunits/quantity/Density.java |
198 |
| org/djunits/quantity/Duration.java |
331 |
| org/djunits/quantity/ElectricCharge.java |
262 |
| org/djunits/quantity/ElectricCurrent.java |
247 |
| org/djunits/quantity/ElectricPotential.java |
230 |
| org/djunits/quantity/ElectricalCapacitance.java |
219 |
| org/djunits/quantity/ElectricalConductance.java |
223 |
| org/djunits/quantity/ElectricalInductance.java |
176 |
| org/djunits/quantity/ElectricalResistance.java |
237 |
| org/djunits/quantity/Energy.java |
366 |
| org/djunits/quantity/EquivalentDose.java |
186 |
| org/djunits/quantity/FlowMass.java |
247 |
| org/djunits/quantity/FlowVolume.java |
292 |
| org/djunits/quantity/Force.java |
278 |
| org/djunits/quantity/Frequency.java |
259 |
| org/djunits/quantity/Illuminance.java |
202 |
| org/djunits/quantity/Length.java |
385 |
| org/djunits/quantity/LinearObjectDensity.java |
257 |
| org/djunits/quantity/LuminousIntensity.java |
186 |
| org/djunits/quantity/MagneticFlux.java |
249 |
| org/djunits/quantity/MagneticFluxDensity.java |
199 |
| org/djunits/quantity/Mass.java |
308 |
| org/djunits/quantity/Power.java |
309 |
| org/djunits/quantity/Pressure.java |
254 |
| org/djunits/quantity/RadioActivity.java |
205 |
| org/djunits/quantity/SolidAngle.java |
187 |
| org/djunits/quantity/Speed.java |
346 |
| org/djunits/quantity/Torque.java |
265 |
| org/djunits/quantity/Volume.java |
344 |
public static final AbsorbedDose.Unit rad = new AbsorbedDose.Unit("rad", "rad", 1.0E-2, UnitSystem.CGS);
/**
* Create a new AbsorbedDose unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public AbsorbedDose ofSi(final double si, final UnitInterface<AbsorbedDose> displayUnit) |
| File |
Line |
| org/djunits/quantity/Acceleration.java |
262 |
| org/djunits/quantity/AmountOfSubstance.java |
206 |
| org/djunits/quantity/Angle.java |
282 |
| org/djunits/quantity/AngularAcceleration.java |
228 |
| org/djunits/quantity/AngularVelocity.java |
198 |
| org/djunits/quantity/Area.java |
336 |
| org/djunits/quantity/CatalyticActivity.java |
217 |
| org/djunits/quantity/Density.java |
198 |
| org/djunits/quantity/Duration.java |
331 |
| org/djunits/quantity/ElectricCharge.java |
262 |
| org/djunits/quantity/ElectricCurrent.java |
247 |
| org/djunits/quantity/ElectricPotential.java |
230 |
| org/djunits/quantity/ElectricalCapacitance.java |
219 |
| org/djunits/quantity/ElectricalConductance.java |
223 |
| org/djunits/quantity/ElectricalInductance.java |
176 |
| org/djunits/quantity/ElectricalResistance.java |
237 |
| org/djunits/quantity/EquivalentDose.java |
186 |
| org/djunits/quantity/FlowMass.java |
247 |
| org/djunits/quantity/FlowVolume.java |
292 |
| org/djunits/quantity/Force.java |
278 |
| org/djunits/quantity/Frequency.java |
259 |
| org/djunits/quantity/Illuminance.java |
202 |
| org/djunits/quantity/Length.java |
385 |
| org/djunits/quantity/LinearObjectDensity.java |
257 |
| org/djunits/quantity/LuminousIntensity.java |
186 |
| org/djunits/quantity/MagneticFlux.java |
249 |
| org/djunits/quantity/MagneticFluxDensity.java |
199 |
| org/djunits/quantity/Mass.java |
308 |
| org/djunits/quantity/Pressure.java |
254 |
| org/djunits/quantity/RadioActivity.java |
205 |
| org/djunits/quantity/SolidAngle.java |
187 |
| org/djunits/quantity/Speed.java |
346 |
| org/djunits/quantity/Torque.java |
265 |
| org/djunits/quantity/Volume.java |
344 |
public static final Acceleration.Unit Gal = new Acceleration.Unit("Gal", "gal", 0.01, UnitSystem.CGS);
/**
* Create a new Acceleration unit.
* @param id the id or main abbreviation of the unit
* @param name the full name of the unit
* @param scaleFactorToBaseUnit the scale factor of the unit to convert it TO the base (SI) unit
* @param unitSystem the unit system such as SI or IMPERIAL
*/
public Unit(final String id, final String name, final double scaleFactorToBaseUnit, final UnitSystem unitSystem)
{
super(id, name, scaleFactorToBaseUnit, unitSystem);
}
/**
* Return a derived unit for this unit, with textual abbreviation(s) and a display abbreviation.
* @param textualAbbreviation the textual abbreviation of the unit, which doubles as the id
* @param displayAbbreviation the display abbreviation of the unit
* @param name the full name of the unit
* @param scale the scale to use to convert from this unit to the standard (e.g., SI, BASE) unit
* @param unitSystem unit system, e.g. SI or Imperial
* @param siPrefix the SI Prefix of this unit
*/
public Unit(final String textualAbbreviation, final String displayAbbreviation, final String name, final Scale scale,
final UnitSystem unitSystem, final SIPrefix siPrefix)
{
super(textualAbbreviation, displayAbbreviation, name, scale, unitSystem, siPrefix);
}
@Override
public SIUnit siUnit()
{
return SI_UNIT;
}
@Override
public Unit getBaseUnit()
{
return SI;
}
@Override
public Acceleration ofSi(final double si, final UnitInterface<Acceleration> displayUnit) |
| File |
Line |
| org/djunits/vecmat/d3/AbsVector3.java |
130 |
| org/djunits/vecmat/d3/AbsVector3.java |
333 |
R extends Reference<R, A, Q>> AbsVector3.Col<A, Q> of(final A absX, final A absY, final A absZ)
{
Throw.whenNull(absX, "absX");
Throw.whenNull(absY, "absY");
Throw.whenNull(absZ, "absZ");
Throw.when(!absX.getReference().equals(absY.getReference()), IllegalArgumentException.class,
"absX.reference != absY.reference");
Throw.when(!absX.getReference().equals(absZ.getReference()), IllegalArgumentException.class,
"absX.reference != absZ.reference");
return new AbsVector3.Col<>(Vector3.Col.of(absX.getQuantity(), absY.getQuantity(), absZ.getQuantity()), |