djunits v6.0.0-alpha
Version 6.0.0-alpha is a complete re-implementation of djunits, and it requires changes in the code that use it. The most notable changes are:
` Quantities are central, and units are ways of displaying or entering quantity values.
- Units are now an inner class of their respective quantities, so,
Length.Unitrather thanLengthUnit. - Naming of units is done using the abbreviation rather than the name, so
Speed.Unit.km_hinstead ofSpeed.Unit.KILOMETER_PER_HOUR. - naming of units also follows common upper/lower case conventions:
Energy.Unit.kJandLength.Unit.km. - The
sivalue is not retrieved byquantity.sibut ratherquantity.si(). - The DimensionlessUnit unit class has been renamed to Unitless.
- Absolute quantities have been re-implemented using a Reference for the reference point.
- Function names have changes and made consistent across djunits, e.g.,
multiply,divide,add,substract,scaleBy,divideBy. - The flexible classes
SIQuantityandSIUnitbehave like any other quantity and unit. - Vectors and matrices have an implementation using generics such as Matrix3x3<Area, Area.Unit>, and only allow correct operations.
- Vectors and matrices have Hadamard operations and algebraic vector/matrix operations.
- Efficient vector and matrix classes have been generated for sizes 1 to 3.
- A
QuantityTableclass has been added for storing quantities without allowing algebraic operations. - Localization has been implemented from the start rather than as an afterthought.
The following issues have been addressed:
- #5. Remove display unit storage in class and resource bundle
- #50. Simplification
- #51. Turn Scalar into Quantity
- #52. Remove FloatScalar classes from djunits
- #53. Create one storage class for double and float vectors and matrices
- #55. Store base unit information with quantity
- #56. Make resource bundles deal with overrides only
- #58. See if the unit can have a method to instantiate a quantity
- #59. Remove functions that do not directly make sense for scalars
- #62. Create setDisplayUnit(string) method for Quantity
- #63. Change names of some 'Electrical' quantity classes
- #64. LinearDensity class has the wrong units
- #65. Reconsider the use of the term Vector and Matrix in djunits
- #67. Create fine-grained interfaces for operations on djunts elements
- #68. Implement method chaining for setDisplayValue
- #69. Tolerance for matrix operations should be specified as a quantity
- #70. Units of matrix operations should be specified correctly in the interface
- #71. Use Unitless instead of Dimensionless.Unit
- #72. See if the quantities can be further simplified
- #73. Create a proper as method
- #74. Reconsider implementation of Absolute vs Relative
- #75. Rename Vector and Matrix classes for clarity and consistency
- #77. Remove fractional SI dimensions for now
- #79. Write new documentation for version 6
- #80. Write new unit tests for djunits
- #81. Replace exceptions with standard ones where possible
- #82. Units class should load units only when used
- #83. Consider constants for units
- #84. Include style guide for naming of units and constants in the manual
- #85. Include use of 'natural' units in user code in documentation
- #86. Re-create add and subtract functions for absolute quantities
- #87. Implement convenience constructors in DataGrid
- #88. Implement convenience constructors for Vector and Matrix
- #89. Extend contract for vectors
- #90. Make an inbetween Matrix class for DataGrid matrices
- #91. Change Vector and Matrix constructors w.r.t. displayUnit
- #92. Include missing code in Matrix class
- #93. The DataGrid class needs an instantiate method with rows and cols
- #94. Remove
</p>from javadoc - #95. Create Vector and matrix methods for multiplication with scalar
- #96. Create as(targetUnit) method for VectorN
- #97. Create equals() methods for different DataGrid types
- #99. Clean up interface hierarchy for Vector and Matrix
- #100. Add isDense, isSparse, isDouble, isFloat methods to DataGridSi
- #101. Separate 1-based from 0-based operations on vector and matrix classes
- #102. Write test code for Matrix1x1 and Vector1
- #103. Write test code for Vector methods getRowScalars, getRowSi, getRowVector + column