com.io7m.jtensors
The jtensors package package implements a set of vector and matrix types, intended for use in computer graphics software.
See Mathematics for 3D Game Programming and Computer Graphics.
Features
- 2D, 3D, and 4D immutable vector types in float and double versions.
- 2D, 3D, and 4D immutable vector types in int and long versions.
- 4D immutable quaternion types in float and double versions.
- 2x2, 3x3, and 4x4 mutable matrix types in float and double versions.
- Phantom-typed variants of all types for statically distinguishing between semantically different but otherwise type-compatible vectors and matrices.
- Fully documented (Javadoc).
- Massive battery of tests for checking the behaviour of matrix/vector implementations.
- 100% automated unit test coverage.
- OSGi-ready
- JPMS-ready
- ISC license.
Releases
The most recently published version of the software is 11.0.0.
Source code and binaries are available from the repository.
Documentation
Documentation for the 11.0.0 release is available for reading online.
Documentation for current and older releases is archived in the repository.
User documentation
Maven
The following is a complete list of the project's modules expressed as Maven dependencies:
<dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.core</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.documentation</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.generators</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.orthonormalization</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.storage.api</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.storage.bytebuffered</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.storage.heap</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.tests</artifactId> <version>11.0.0</version> </dependency> <dependency> <groupId>com.io7m.jtensors</groupId> <artifactId>com.io7m.jtensors.benchmarking</artifactId> <version>11.0.0</version> </dependency>
Each release of the project is made available on Maven Central within ten minutes of the release announcement.
Changes
Subscribe to the releases atom feed.
2024-05-10 | Release: com.io7m.jtensors 11.0.0 |
2024-04-19 | Change: Update org.immutables:value:2.10.0 → 2.10.1. |
2024-04-19 | Change: Update junit.version:5.10.1 → 5.10.2. |
2024-04-19 | Change: Update org.slf4j:slf4j-api:2.0.10 → 2.0.13. |
2024-04-19 | Change: Update ch.qos.logback:logback-classic:1.4.14 → 1.5.6. |
2024-05-08 | Change: Update com.io7m.jequality:com.io7m.jequality.core:3.0.0 → 3.0.1. |
2024-05-08 | Change: Update com.io7m.ieee754b16:com.io7m.ieee754b16.core:3.0.0 → 3.0.1. |
2024-05-10 | Change: Move to new organization. |
2024-05-10 | Change: (Backwards incompatible) Require JDK 17. |
2024-05-10 | Release: com.io7m.jtensors 10.0.0 |
2021-01-16 | Change: Migrate to JUnit 5 (tickets: 25 ) |
2021-01-16 | Change: Add element-wise multiplication (tickets: 24 ) |
2021-01-16 | Change: (Backwards incompatible) Require JDK 11 and Java 11 at run-time |
2017-11-16 | Release: com.io7m.jtensors 9.0.0 |
2017-11-16 | Change: (Backwards incompatible) All modules are now Java 9 modules. JDK 9 is now required. |
2017-11-16 | Change: (Backwards incompatible) Removed dependency on com.io7m.jnull. |
2017-06-27 | Release: com.io7m.jtensors 8.2.0 |
2017-06-27 | Change: Add bilinear interpolation methods. (tickets: 22 ) |
2017-05-06 | Release: com.io7m.jtensors 8.1.0 |
2017-05-06 | Change: Add vector distance methods. |
2017-04-24 | Release: com.io7m.jtensors 8.0.0 |
2017-03-22 | Change: (Backwards incompatible) Complete rewrite. See japicmp report for changes. |
2017-03-20 | Release: com.io7m.jtensors 7.2.0 |
2017-03-20 | Change: Switch to generating sources. This adds deprecations to various methods (see the japicmp report). |
2017-03-01 | Change: Use the japicmp-maven-plugin to enforce semantic versioning for future releases. |
2017-01-30 | Release: com.io7m.jtensors 7.1.0 |
2017-01-30 | Change: Add spherical linear interpolation for quaternions. (tickets: 11 ) |
2017-01-30 | Release: com.io7m.jtensors 7.0.0 |
2016-11-24 | Change: Add quickcheck generators. |
2016-10-04 | Change: Add functions to convert quaternions to axis/angle representations. (tickets: 8 ) |
2016-08-04 | Change: The packaged jar is now an OSGi bundle. |
2016-08-04 | Change: (Backwards incompatible) The package will no longer compile on JDK 6 due to Checkstyle, but the compiled code is still JDK 6 compatible. |
2015-09-27 | Change: Add heap-array allocated matrix types. |
2015-09-27 | Change: Add buffered vector and matrix types for addressing values that are packed inside large shared ByteBuffers. |
2015-09-06 | Change: (Backwards incompatible) Rename all Context* types to behave more pleasantly with unqualified imports. |
2015-09-05 | Change: (Backwards incompatible) All vector functions that allocated temporary objects now take re-usable preallocated Context values in the same manner as matrix functions. |
2015-09-05 | Change: (Backwards incompatible) Replace most direct uses of mutable vector types with generics and interfaces. This allows for code sharing between a selection of new vector types. |
2014-11-29 | Change: Add explicitly type-indexed vectors (PVector*). |
2014-11-29 | Change: (Backwards incompatible) Make all types final again, undoing the change made in 5.1.0 to support type indices. |
2014-11-30 | Change: (Backwards incompatible) Remove get() methods from matrix types and only allow element access via the MatrixReadable* interfaces. |
2014-11-30 | Change: Improve formatting of matrix toString() methods slightly. |
2014-11-30 | Change: Remove floatBuffer() and doubleBuffer() methods and only allow access to buffers via the new MatrixDirectBuffered* interfaces. |
2014-12-03 | Change: Correct javadoc comments to pass Java 8's new Javadoc doclint. |
2014-12-04 | Change: (Backwards incompatible) Remove Matrix*.translate* functions due to questions of correctness. Use r = Matrix*.makeTranslation* and multiply m * r instead. |
2014-12-04 | Change: (Backwards incompatible) Remove imperative Matrix*.rotate* functions to reduce the size of the API. Use r = Matrix*.makeRotation* and multiply m * r instead. |
2015-08-29 | Release: com.io7m.jtensors 6.0.2 |
2015-08-29 | Change: Migrate to GitHub. |
2015-08-29 | Change: Fix JavaDoc to cope with Java 8's doclint. |
2014-10-12 | Release: com.io7m.jtensors 6.0.1 |
2014-10-12 | Change: Correct dependencies: 6.0.0 was accidentally released with pre-release version dependencies (all of which are binary compatible with the current versions). |
2014-10-11 | Release: com.io7m.jtensors 6.0.0 |
2014-04-24 | Change: (Backwards incompatible) Break dependency on jaux. Now depends on jnull, jfunctional, jequality, jintegers. |
2014-04-24 | Change: (Backwards incompatible) Make *Unsafe vector functions that were accidentally public, private. |
2014-04-24 | Change: Add VectorWritable* types. |
2014-04-24 | Change: (Backwards incompatible) Break package up into standard core and documentation packages. |
2014-04-24 | Change: (Backwards incompatible) Make vector fields private. Replace field access with getters and setters. |
2014-01-04 | Release: com.io7m.jtensors 5.3.1 |
2014-01-04 | Change: Use jaux (3.0.0, 4.0.0] and jsr305 2.0.2. |
2013-10-27 | Release: com.io7m.jtensors 5.3.0 |
2013-10-27 | Change: Add long integer vectors. |
2013-08-17 | Release: com.io7m.jtensors 5.2.1 |
2013-08-17 | Change: Make the Orthonormalized structures take readable vectors. |
2013-08-17 | Release: com.io7m.jtensors 5.2.0 |
2013-08-17 | Change: Add three-vector orthonormalization (OrthonormalizedI3D, OrthonormalizedI3F). |
2013-08-17 | Change: Correct the type of VectorI*.ZERO - do not use the less-specific "Readable" type. |
2013-08-17 | Change: Correct documentation for vector subtraction. (tickets: 3b145b9693 ) |
2013-07-11 | Release: com.io7m.jtensors 5.1.0 |
2013-07-11 | Change: (Backwards incompatible) All vector, matrix, and quaternion types are now non-final (however all methods are still final). This is to make it possible to make semantically distinct values type-incompatible via subclassing and/or the addition of phantom type parameters. See documentation. |
2012-12-22 | Release: com.io7m.jtensors 5.0.0 |
2012-12-22 | Change: Add all missing Vector* functions - VectorM* and VectorI* now have feature parity |
2012-12-21 | Change: (Backwards incompatible) Massive overhaul of test suite |
2012-12-18 | Change: (Backwards incompatible) All approximatelyEqual* functions have been removed; use almostEqual instead as it gives far more accurate results |
2012-12-18 | Change: (Backwards incompatible) MatrixReadable* functions renamed to make the row types explicit |
2012-12-18 | Change: (Backwards incompatible) Most quaternion functions that took or returned single precision floats now take/return double precision values |
2012-12-18 | Change: (Backwards incompatible) Quaternion*.makeRotationMatrix() renamed to makeRotationMatrix4x4 and added 3x3 variant |
2012-12-17 | Change: (Backwards incompatible) All single precision matrix and vector types now use double precision calculations internally for increased accuracy. Most functions that took floats as arguments now take doubles. The vectors and matrices are still using single precision float storage, so this should not break any existing code. |
2012-12-17 | Change: Add row fetching methods to all MatrixReadable* interfaces |
2012-12-16 | Change: Vastly improve documentation. Document all notational, semantic, and storage conventions. |
2012-12-16 | Change: (Backwards incompatible) Switch to using a consistent right-handed coordinate system throughout the package. This is a non backwards-compatible change. |
2012-12-16 | Change: Add Matrix*.lookAt() |
2012-12-15 | Change: Add Matrix3x3*.rotate() and makeRotation() |
2012-12-15 | Change: Add Quaternion*.lookAt() |
2012-12-15 | Change: Add Quaternion*.makeFromMatrix() |
2012-12-15 | Change: Add Matrix*.trace() |
2012-12-14 | Change: Add Vector*.orthoNormalize() |
2012-12-09 | Change: (Backwards incompatible) Modify the type of QuaternionM4{D,F}.copy() to allow any readable quaternion, as opposed to only QuaternionM4{F,D}. This change does not affect backwards-compatibility as it is simply a generalization of the type in question and cannot break existing programs. |
2012-11-24 | Release: com.io7m.jtensors 4.1.0 |
2012-11-24 | Change: Make every matrix operation rewind the buffer that backs the matrix. This was a problem revealed by the API change in 4.0.0 |
2012-11-24 | Release: com.io7m.jtensors 4.0.0 |
2012-11-24 | Change: Fix serious API mistake: The JRE will allocate new read-only buffers with asReadOnlyBuffer(). The floatBuffer() and doubleBuffer() methods of matrices no longer guarantee read-only semantics, as this requires expensive reallocations. |
2012-11-10 | Release: com.io7m.jtensors 3.0.0 |
2012-11-10 | Change: Add Quaternion classes for 3D rotations |
2012-11-10 | Change: Remove all @Deprecated methods from 2.3.0 |
2012-11-09 | Change: Large javadoc updates and increased use of JSR 305 annotations (@Nonnull) |
2012-11-09 | Change: All classes now provide a hashCode() and equals() implementation. This may break code that assumes java.lang.Object()'s hashCode() or equals() method is used, but should give more consistent behaviour with regards to the contents of vectors and matrices. |
2012-11-09 | Release: com.io7m.jtensors 2.3.0 |
2012-11-09 | Change: Use io7m-jaux 2.3.0 |
2012-10-21 | Change: Use JSR 305 annotations to document concurrency properties |
2012-08-08 | Change: Change method names for consistency, deprecate old names (does not break compatibility) |
2012-08-07 | Change: Add MatrixReadable* interfaces |
2012-07-27 | Change: Update saxon-plugin to 1.1.0 to correct documentation builds on Windows |
2012-07-23 | Release: com.io7m.jtensors 2.2.0 |
2012-07-23 | Change: Update all POM plugins to the latest versions |
2012-07-23 | Change: Improve documentation |
2012-07-15 | Change: Add missing documentation CSS |
2012-07-14 | Release: com.io7m.jtensors 2.1.0 |
2012-07-14 | Change: Produce documentation with Maven |
2012-07-14 | Change: Make dependencies more honest: The package only depends on jsr305, not all of findbugs |
2012-06-19 | Release: com.io7m.jtensors 2.0.0 |
2012-06-19 | Change: Switch to maven for builds |
2012-05-12 | Change: ApproximatelyEqual* moved to io7m-jaux |
2012-05-05 | Change: VectorI*.zero renamed to ZERO and implemented by all vector types |
2012-05-05 | Change: MatrixM4x4D.multiply -> MatrixM4x4D.multiplyVector4DWithContext |
2012-05-05 | Change: MatrixM4x4D.multiply -> MatrixM4x4D.multiplyVector4D |
2012-05-05 | Change: Increase test coverage for integer vectors |
2012-05-05 | Change: Add Matrix3x3* makeTranslation functions |
2012-04-20 | Change: Add integer vector methods for Matrix4x4* |
2012-04-20 | Change: Rename methods to indicate the type of vectors used, removing ambiguity. All VectorReadable* interfaces are affected, as well as Matrix* methods that previously specified a type name. |
2012-03-15 | Release: com.io7m.jtensors 1.0.1 |
2012-03-15 | Change: Correct build.xml to produce a jar file with the right version |
2012-03-15 | Release: com.io7m.jtensors 1.0.0 |
2012-03-06 | Change: Depend on jexternals for eclipse users |
2012-02-11 | Change: MatrixM3x3F allocated too many bytes (wasted memory) |
2012-02-08 | Change: Add SunOS supported |
2012-02-06 | Release: com.io7m.jtensors 0.2.0 |
2012-02-06 | Change: Initial version |
Sources
This project uses Git to manage source code.
Repository: https://www.github.com/io7m-com/jtensors
$ git clone https://www.github.com/io7m-com/jtensors
License
Copyright © 2024 Mark Raynsford <code@io7m.com> https://www.io7m.com Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Bug Tracker
The project uses GitHub Issues to track issues.