Skip to content

djunits v6.0.0

Choose a tag to compare

@averbraeck averbraeck released this 05 May 12:49

Version 6.0.0 is a complete re-implementation of djunits, and it requires changes in the code that use it. The most notable changes with respect to djunits version 5 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.Unit rather than LengthUnit.
  • Naming of units is done using the abbreviation rather than the name, so Speed.Unit.km_h instead of Speed.Unit.KILOMETER_PER_HOUR.
  • naming of units also follows common upper/lower case conventions: Energy.Unit.kJ and Length.Unit.km.
  • 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 SIQuantity and SIUnit behave like any other quantity and unit.
  • Vectors and matrices have an implementation using generics such as Matrix3x3<Area>, 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 QuantityTable class has been added for storing quantities without allowing algebraic operations.
  • Localization has been implemented from the start rather than as an afterthought.
  • All quantities, vectors, matrices and quantity tables have an absolute variant that starts with Abs.
  • Vectors have a Row and Col subclass for row and column vectors; e.g. VectorN.Row and VectorN.Col.

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
  • #60. Class Format: %g conversion
  • #61. Class Format: Locale use
  • #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
  • #76. Absolute quantity vectors, matrices and tables
  • #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
  • #98. Add formatter for vectors and matrices
  • #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
  • #104. Rethink printing of absolute quantities
  • #105. Rethink method names for Scale interface
  • #106. Consider 'entry' instead of 'element' in method names for Hadamard operations
  • #107. Add transpose() method to Matrix
  • #108. Add getSiGrid() method to VectorMatrix
  • #109. Add nnz() or nonZeroCount()methods to all vectors and matrices
  • #110. Rename cardinality() in DataGridSi to nonZeroCount()
  • #111. Rename Matrix.determinantScalar method to determinantSi
  • #116. Remove mode operation for vector, matrix and quantity table
  • #117. Update technical documentation main page (apt file).
  • #118. Update link to surefire report in technical documentation (error 404)
  • #125. Update Quantity documentation page to describe operations
  • #127. Research whether generic U can be removed as much as possible
  • #128. See if UnitInterface can be renamed to Unit
  • #129. See if U parameter can also be removed from AbsoluteQuantity
  • #130. Allow si field again instead of si() method
  • #131. Change name of si() method in vectors and matrices
  • #132. Check if AbsoluteQuantity should extend Number
  • #133. Create method that can instantiate a generic AbsoluteQuantity
  • #134. Change generics to include transpose return type
  • #135. Change inheritance for Vector
  • #136. Move getRowXXX, getColumnXXX methods to new class Table
  • #137. Rename AbsoluteQuantity to AbsQuantity
  • #138. Create of() and ofSi() methods for vectors, matrices, tables
  • #139. Make a Reference interface to avoid AbstractReference
  • #140. Add documentation for absolute vectors, matrices and tables
  • #141. Add documentation for of() and ofSi() methods
  • #142. Change constructors of Vector and Matrix to SI values
  • #143. Add as() methods for AbsVector
  • #144. Add as() methods for AbsMatrix
  • #145. add as() methods for AbsQuantityTable
  • #146. Add method to subtract AbsQuantity from AbsVector and AbsMatrix
  • #147. Add of(A[]), of(A, A) methods to AbsVector classes
  • #148. Add of(A[]), of(A[][]) methods to create AbsMatrix
  • #149. Add of(A[]), of(A[][]) methods to create AbsQuantityTable
  • #150. Create full test coverage of relative as() functions
  • #151. Rename Quantity method instantiate(si) to instantiateSi(si)
  • #152. Rationalize toString() methods of Quantity
  • #153. Allow setterCanReturnItsClass in checkstyle
  • #155. Change toString(...) methods to format(...) in SIUnit class