Files
ojalgo/ojalgo.changes
2025-12-26 09:07:11 +01:00

569 lines
27 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-------------------------------------------------------------------
Wed Dec 24 21:14:30 UTC 2025 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v56.1.1
* Added
~ org.ojalgo.matrix
+ There was a problem with GenericStore factory type
declarations and usage.
- Update to v56.1.0
* Added
~ org.ojalgo.data
+ New package org.ojalgo.data.proximity containing various
distance and similarity calculation utilities.
+ Spectral clustering: New
org.ojalgo.data.cluster.SpectralClusterer implementing
spectral clustering over feature vectors using an RBF
similarity graph and the symmetric normalised Laplacian.
Factory methods FeatureBasedClusterer.newSpectral(int) and
newSpectral(DistanceMeasure,int) create instances.
+ Clustering facade: New
org.ojalgo.data.cluster.FeatureBasedClusterer facade with
factory methods newAutomatic(...), newGreedy(...),
newKMeans(...), and newSpectral(...). Adds a generic
cluster(Collection<T>, Function<T,float[]>) that maps
arbitrary items to feature vectors and returns clusters as
List<Map<T,float[]>>.
+ Automatic k selection: New
org.ojalgo.data.cluster.AutomaticClusterer that derives
thresholds from distance statistics to seed/refine clusters
(k-means under the hood).
~ org.ojalgo.matrix
+ Spectral decomposition: New Eigenvalue.Spectral interface
(extends both Eigenvalue and SingularValue) and factory
convenience Eigenvalue.Factory#makeSpectral(int) for normal
(in particular symmetric / Hermitian) matrices, exposing a
decomposition that can simultaneously be treated as an
eigenvalue- and singular value decomposition. Includes
isSPD() convenience check.
+ Static utility helpers: Eigenvalue.reconstruct(Eigenvalue)
plus SingularValue.invert(...), SingularValue.solve(...)
and SingularValue.reconstruct(...) centralise pseudoinverse
/ solve / reconstruction logic.
+ New Quasi-Minimal Residual (QMR) and Minimal Residual
(MINRES) iterative solvers for general nonsymmetric square
and symmetric (possibly indefinite) systems, respectively.
Contributed by @Programmer-Magnus.
~ org.ojalgo.concurrent
+ Execute tasks in a separate JVM: New
ExternalProcessExecutor that runs a specified static method
or a Serializable Callable/Runnable in an external OS
process (child JVM). Provides:
= Hard cancellation and timeouts by killing the process
tree.
= Binary IPC framing (MAGIC/VER/LEN/CRC32) over stdio;
stdout is reserved for protocol frames to avoid
corruption.
= Configurable ProcessOptions builder for heap (-Xmx),
additional JVM args, system properties, environment and
classpath; sensible defaults for Maven/Gradle test/main
classpaths.
= Overloads execute(...), call(...) and run(...) to target
methods by Method, MethodDescriptor or
owner/name/parameter types.
= ProcessWorker main class (child entrypoint) and
MethodDescriptor describing methods across classloaders.
= ProcessAwareThread and a process-aware thread factory
used so that interrupting an owner thread forcibly tears
down the child process.
+ Thread factory: DaemonPoolExecutor exposes an internal
process-aware ThreadFactory used by ExternalProcessExecutor
(threads remain daemon and identifiably named).
+ Collections: MultiviewSet adds isAnyContents() to cheaply
detect if any backed priority view still has queued
entries.
~ org.ojalgo.machine
+ JavaType adds utilities box(Class<?>), unbox(Class<?>) and
resolveType(String) to convert between primitive/wrapper
types and resolve primitive/array/class names (e.g.
"int[]", "java.lang.String[]").
* Changed
~ org.ojalgo.data
+ Clustering refactor and performance: Greedy and k-means
implementations now share a PointDistanceCache for pairwise
distances, centroids and initialisation (median-based
threshold), reducing allocations and repeated work.
+ Consistent factories and results: All clusterers are
constructed via FeatureBasedClusterer factories and return
clusters sorted by decreasing size when using the generic
cluster(Collection<T>, Function<T,float[]>) entry point.
+ Singular Value Decomposition API now uses standard
nomenclature: diagonal singular value matrix accessor
changed from getD() to getS() (see Deprecated). Internal
implementations (DenseSingularValue, RawSingularValue)
updated accordingly.
+ Performance & allocation improvements in DenseSingularValue
and RawSingularValue: direct use of internal singular value
array (s[]), deferred/cached construction of S and inverse,
centralised solve/invert logic reducing temporary object
creation.
+ Eigenvalue decomposition updated to integrate spectral
variant; minor javadoc clarifications and shared
reconstruction via new static helper.
~ org.ojalgo.matrix
+ Internal refactoring in the
org.ojalgo.matrix.task.iterative package. If you only used
what was there these changes shouldn't affect you, but if
you have implemented your own solver it does.
+ Created a Preconditioner interface. Factored the
Jacobi-presolving out of the ConjugateGradientSolver and
additionally implemented a Symmetric Successive
Over-Relaxation (SSOR) preconditioner.
~ org.ojalgo.optimisation
+ In ConvexSolver, the iterative Schur complement solver used
in the active set solver, is now configurable (which
implementation to use). Use either the
ConjugateGradientSolver or QMRSolver, or some other
implementation.
~ org.ojalgo.concurrent
+ DivideAndConquer now uses a safer split-and-join: sibling
tasks are cancelled on failure, causes are propagated, and
interruption is preserved. The configurable Divider exposes
threshold(int) and parallelism(IntSupplier);
ProcessingService#newDivider() returns one bound to its
executor. Default worker count uses
OjAlgoUtils.ENVIRONMENT.threads consistently.
+ ProcessingService#divider() is deprecated in favour of
newDivider() (same behaviour); javadocs clarified for
compute/map/reduce* regarding uniqueness and hashing
requirements.
+ DaemonPoolExecutor: internal addition of a process-aware
thread factory; no behavioural change for existing
new*ThreadPool(...) helpers.
* Deprecated
~ org.ojalgo.matrix
+ SingularValue#getD() deprecated; use getS() instead.
(Existing code continues to work; plan to remove in a
future major release.)
~ org.ojalgo.concurrent
+ ProcessingService#divider() in favour of newDivider().
* Fixed
~ org.ojalgo.optimisation
+ Fixed a couple of presolve issues with
ExpressionsBasedModel and quadratic constraints.
- Update to v56.0.0
ojAlgo is now modularised into a JPMS named module, and that
module is named "ojalgo".
* Added
~ org.ojalgo.matrix
+ New MatrixStore:s compressed sparse column (CSC) and
compressed sparse row (CSR) implementations named R064CSC
and R064CSR (primitive double, R064, only). Any/all of the
previously existing sparse MatrixStore implementations
SparseStore, RowsSupplier and ColumnsSupplier can be
converted to either of these new formats.
+ New utility Eigenvalue#sort function that allow to sort
eigenvalue-vector pairs in descending order. This existed
before as a private method, and was used internally. Now
it's publicly available.
+ New sparse LU decomposition, and it's updatable using
Forrest-Tomlin.
~ org.ojalgo.optimisation
+ Many improvements to the LP solvers (improved basis
representation, candidate selection and more).
~ org.ojalgo.scalar
+ The Scalar interface now defines a isZero() method.
* Changed
~ org.ojalgo.array
+ Refactored the constructors, factories and builders for the
classes in the org.ojalgo.array package. Most things should
work as before, but the generics signature of
DenseArray.Factory has changed. Instead of
DenseArray.Factory<ELEMENT_TYPE> it is now
DenseArray.Factory<ELEMENT_TYPE, ARRAY_TYPE>. What you may
want to do is to instead use a subclass like
PrimitiveArray.Factory.
+ SparseArray is now restricted to Integer#MAX_VALUE size
(used to be Long#MAX_VALUE). There's been a number of
changes internally in order to make it perform better at
smaller sizes. Also added a bunch of new stuff to support
sparse functionality in the org.ojalgo.matrix package.
~ org.ojalgo.machine
+ The (use of the) system property "shut.up.ojAlgo" is
removed. Users will no longer be warned about missing
hardware profiles. Instead this is now always estimated.
The previous fallback estimation logic has been improved
and promoted to be the primary solution. Users are still
encouraged to provide hardware profile instances, but these
are now instead used as test cases for the estimation
logic.
~ org.ojalgo.matrix
+ For symmetric matrices the Eigenvalue decompositions are
now always sorted. Previously it varied depending which
implementation the factory returned. You should still
always check Eigenvalue.isOrdered() - that a general rule
for both eigenvalue and singular value decompositions.
+ Cleaned up the InvertibleFactor interface. The 2-arg
ftran/btran alternatives are removed.
~ org.ojalgo.optimisation
+ Tweaking to various parts of ConvexSolver.
+ Multiple changes and improvements to the LinearSolver. The
number of industry standard netlib models that are solved
(fast enough to be included) as junit tests cases increased
from 45 to 78. The LinearSolver has actually been improved
over several versions, but with this version we see a lot
of that coming together and working quite well.
+ Reworked the IntegerSolver's branching strategy. It now
uses pseudo-costs when selecting which variable to branch
on. The NodeKey now keeps track of the branch depth. This
is used to implement proper depth-first and breadth-first
strategies for the deferred nodes. The default set of node
worker priorities have changed.
+ Reworked the IntegerSolver's cut generation strategy.
~ org.ojalgo.type
+ The relative error (epsilon) derived from the precision of
a NumberContext was previously never smaller than the
machine epsilon. Now it can be arbitrarily small depending
only on the specified precision.
* Fixed
~ org.ojalgo.matrix
+ Matrix multiplication performance using RawStore has been
much improved.
~ org.ojalgo.optimisation
+ When using extended precision with the ConvexSolver there
was a problem when extracting the solution. The solver uses
Quadruple and in the end the solution is using BigDecimal
but at an intermediate step it was converted to double.
- Update to v55.2.0
* Added
~ org.ojalgo.optimisation
+ The EBM file format parser now handles comments and empty
lines in the model file (contributed by Magnus Jansson).
* Changed
~ org.ojalgo.array
+ Better implementation of SparseArray.supplyTo(Mutate1D).
~ org.ojalgo.matrix
+ General refactoring in the decomposition package. Shouldn't
be any api-breaking changes.
+ New interface MatrixDecomposition.Updatable for partial
updates to decompositions. The existing LU decomposition
implementations implement this.
~ org.ojalgo.optimisation
+ Refactoring to SimplexSolver (significant performance
improvements with larger/sparse instances).
+ Improved feasibility check for the QP ActiveSetSolver.
+ Removed some unnecessary work, and garbage creation, when
validation models (contributed by @hallstromsamuel)
~ org.ojalgo.scalar
+ When creating rotation Quaternions the angle is now halved
in the factory method as is standard elsewhere.
(contributed by @twistedtwin)
- Update to v55.1.2
* Changed
~ org.ojalgo.matrix
+ Minor change to progress logging of the
ConjugateGradientSolver - sparse iterative equation system
solver.
~ org.ojalgo.optimisation
+ Minor change to method signature of
ExpressionsBasedModel#addIntegration.
- Update to v55.1.1
* Added
~ org.ojalgo.type
+ The ForgetfulMap gained support for disposer-hooks - code
that is called when objects are invalidated and removed
from the cache. Also streamlined the code to create single
ForgetfulMap.ValueCache<T> instances.
* Changed
~ org.ojalgo.optimisation
+ The configuration option options.experimental is no longer
used to switch between the old/classic and new/dual simplex
solvers. Instead there are specific configurations for this
- options.linear().dual() and options.linear().primal(). If
you don't specify which to use, there is internal logic
that switches implementation based on problem size.
+ Various internal refactoring and numerical tuning to the LP
solvers.
~ org.ojalgo.type
+ NumberContext now explicitly exposes the relative and
absolute errors as getRelativeError() and
getAbsoluteError(), and the epsilon() method has been
redefined to return the maximum of those two values.
-------------------------------------------------------------------
Wed Jan 15 00:19:43 UTC 2025 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v55.1.0
* Added
~ org.ojalgo.data
+ New package org.ojalgo.data.cluster with k-means and greedy
clustering algorithms implemented, as well as
generalisations, specialisations and combinations of those.
+ DataProcessors now has a method Transformation2D
newRowsTransformer(Function<SampleSet, UnaryFunction>) to
complement the existing newColumnsTransformer.
~ org.ojalgo.random
+ SampleSet gained a couple of methods; getMidrange() and
getRange().
* Changed
~ org.ojalgo.array
+ Sorting is no longer parallel/multi-threaded. The previous
implementations made use of the common ForkJoinPool.
~ org.ojalgo.data
+ Creating a JMX bean (to monitor throughput) with BatchNode
is now optional, and the default is to not create them.
(Used to always create them.)
~ org.ojalgo.netio
+ The FromFileReader and ToFileWriter interfaces and their
implementations used to extend and delegate to code in the
org.ojalgo.type.function package. Much of what was in that
package has been moved to and merged with stuff in the
org.ojalgo.netio package.
+ The FromFileReader.Builder and ToFileWriter.Builder
builders now use generic "file" types. They used to be
implemented in terms of Java's File, but can now be
anything like Path or ojAlgo's own SegmentedFile,
ShardedFile or InMemoryFile.
+ The DataInterpreter gained some additional standard
interpreters, as well as utilities to convert back and
forth between byte[].
~ org.ojalgo.random
+ SamleSet no longer makes use of parallel/multi-threaded
sorting - to avoid making use of the common ForkJoinPool.
~ org.ojalgo.type
+ The AutoSupplier and AutoConsumer interfaces are removed.
They used to provide abstract/generalised functionality for
FromFileReader and ToFileWriter in the org.ojalgo.netio
package. All features and functionality still exists, but
in terms of the more specific/concrete FromFileReader and
ToFileWriter. If you directly referenced any of the various
utility methods in AutoSupplier or AutoConsumer they're now
gone. They primarily existed so that FromFileReader and
ToFileWriter could access them (from another package). The
features and functionality they provided are now available
through other classes in the org.ojalgo.netio package -
like FromFileReader.Builder and ToFileWriter.Builder.
* Fixed
~ org.ojalgo.data
+ In DataProcessors, the CENTER_AND_SCALE transformation
didn't do exactly what the documentation said it. That's
been fixed.
- Update to v55.0.2
* Added
~ org.ojalgo.type
+ A new cache implementation named ForgetfulMap. To save you
adding a dependency on Caffeine or similar.
~ org.ojalgo.optimisation
+ There is a new OptimisationService implementation with
which you can queue up optimisation problems to have them
solved. This service is (will be) configurable regarding
how many problems to work on concurrently, and how many
threads the solvers can use, among other things.
* Changed
~ org.ojalgo.optimisation
+ Refactoring and additions to what's in the
org.ojalgo.optimisation.service package. They're breaking
changes, but most likely no one outside Optimatika used
this.
+ Minor internal changes to how the IntegerSolver works.
There's now an equal number of worker threads per
worker-strategy.
* Deprecated
~ org.ojalgo.type
+ TypeCache is replaced by ForgetfulMap.ValueCache.
- Update to v55.0.1
* Added
~ org.ojalgo.concurrent
+ Addition to ProcessingService that simplify concurrently
taking items from a BlockingQueue.
* Changed
~ org.ojalgo.random
+ Refactored SampleSet (internally) to be better aligned with
recent changes to other parts of the library. Primarily the
class now uses int indices for all internal calculations.
Also added a new java.util.stream.Collector implementation
to simplify SampleSet creation from streams.
* Fixed
~ org.ojalgo.optimisation
+ Fixed a bug where the (new) LP solver would fail to
recognise unbounded problems and instead return a solution
with infinite values, stating it to be optimal.
-------------------------------------------------------------------
Sun Oct 6 20:21:39 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v55.0.0
* Changed
~ org.ojalgo.function
+ The BigDecimal valued constants in BigMath for E, PI and
GOLDEN_RATIO are redefined with more decimal digits.
+ The BigDecimal valued functions in BigMath for EXP, LOG,
SIN and COS are re-implemented to produce much more
accurate results.
~ org.ojalgo.optimisation
+ The new LP solver implementation is now the default
alternative.
+ The two classes LinearSolver.GeneralBuilder and
LinearSolver.StandardBuilder are replaced by a common
LinearSolver.Builder. Consequently the methods
newGeneralBuilder() and newStandardBuilder() are deprecated
and replaced by newBuilder().
~ org.ojalgo.scalar
+ Re-implemented Quadruple's divide method using primitives
only. (Previously delegated to BigDecimal.)
* Deprecated
~ org.ojalgo.data
+ Everything related to downloading (historical) financial
data is deprecated. It's already broken (due to changes in
the external "service") and we're not going to try fix it.
* Removed
~ org.ojalgo.structure
+ Removed a bunch of stuff that was deprecated in Factory1D,
Factory2D and FactoryAnyD and/or some of their
sub-interfaces.
-------------------------------------------------------------------
Thu Jun 13 17:18:48 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v54.0.0
* Added
~ org.ojalgo.matrix
+ Added the ability to specify the initial capacity of a
SparseStore.
+ More efficient sparse to sparse copying of SparseStore.
+ New option to use a builder when initially setting the
elements of a SparseStore.
+ When setting (or adding to) elements there used to be
internally synchronized code. This is no longer the case.
Instead you must call synchronised() to get a synchronized
mutating wrapper. This should make common single threaded
usage faster.
+ The sparse BasicMatrix builder no longer has all the
methods that really only made sense with dense
implementation. The sparse builder implementation changed
to use that new SparseStore.Builder.
~ org.ojalgo.structure
+ There are new methods fillCompatile(...),
modifyCompatile(...) and onCompatile(...) to complement the
already existing "fill", "modify" and "on" methods.
(Inspired by MATLAB's concept of compatible array sizes for
binary operation.)
+ The factory interfaces got methods to construct instances
of compatible sizes/shapes. (Inspired by MATLAB's concept
of compatible array sizes for binary operation.)
* Changed
~ org.ojalgo.matrix
+ The classes Primitive64Store and Primitive32Store have been
renamed R064Store and R032Store. These classes are central
to ojAlgo. The effect of this name change is widespread.
ojAlgo has been transitioning to a new naming scheme over
several versions now, but these classes were left untouched
so far (in part because of how central they are). Now, to
complete the work, it's done! No deprecations, just did it.
Apart from the name change the classes are identical.
+ Vector space method like "add" and "subtract" have been
redefined to no longer throw exceptions if dimensions are
not equal, but instead broadcast/repeat rows or columns.
(Inspired by MATLAB's concept of compatible array sizes for
binary operation.)
~ org.ojalgo.optimisation
+ Refactored, cleaned up deprecations, primarily regarding
how model variables are created. They can no longer be
instantiated independent of a model. You have to first
create the model, and then use that as the variable (and
expression) factory.
~ org.ojalgo.structure
+ Refactored the builder/factory interfaces to better support
creating immutable 1D, 2D or AnyD structures. This has
implications for most ojAlgo data structures. There are
deprecations in all factory classes, but everything that
worked before still works (I believe).
+ The Structure*D, Access*D, Mutate*D and Factory*D
interfaces have all been refactored to make working with
int indices (rather than long) the primary alternative.
Huge data structures, that require long indices, are still
suported - no change in this regard. In reality only a few
implementations actually allowed to create such large
instances. This change is to allow all the other classes to
be implemented using int and not bother (so much) with
long. Users of the various classes in ojAlgo should see no
difference. If you have created your own classes
implementing some of ojAlgo's interfaces you will probably
need to implement some additional methods in those classes.
-------------------------------------------------------------------
Fri May 24 09:45:31 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v53.3.0
* Added
~ org.ojalgo.function
+ Some additional PowerOf2 utilities.
~ org.ojalgo.netio
+ SegmentedFile that divides a large file in segments to
enable reading those in parallel using memory mapped files
(memory mapped file segments).
~ org.ojalgo.type
+ New primitive number parsers in NumberDefinition. They take
CharSequence rather than String as input and do not create
any intermediate objects. In particular the parseDouble
performs much better than its counterpart in Double. The
downside is that it only handles a limited plain format.
* Changed
~ org.ojalgo.concurrent
+ The reduce(...) methods of ProcessingService are renamed
(deprecated) reduceMergeable(...). In addition there are
now also reduceCombineable(...).
~ org.ojalgo.data
+ The processMapped(...) method of BatchNode is renamed
(deprecated) processMergeable(...). In addition there is
now also processCombineable(...).
+ The reduceMapped(...) method of BatchNode is renamed
(deprecated) reduceByMerging(...). In addition there is now
also reduceByCombining(...).
~ org.ojalgo.type
+ The merge(Object) method of TwoStepMapper has been removed.
Instead there are two new sub-interfaces
TwoStepMapper.Mergeable and TwoStepMapper.Combineable.
- Update to v53.2.0
* Added
~ org.ojalgo.data
+ There is a new package org.ojalgo.data.transform that (so
far) contain implementations of the ZTransform and the
DiscreteFourierTransform. Most notably ojAlgo now contains
an implementation of the FFT algorithm.
+ ImageData has been extended with features to work with
Fourier transforms of images, as well as a Gaussian blur
function.
~ org.ojalgo.function
+ The PolynomialFunction interface now extends
org.ojalgo.algebra.Ring which means it is now possible to
add and multiply polynomials. Theres also been some
refactoring of the internals of the polynomial
implementations.
+ Two new PrimitiveFunction.Unary implementations
PeriodicFunction and FourierSeries. It is now possible to
take any (periodic) function and, via FFT, get a Fourier
series approximation of it (1 method call).
~ org.ojalgo.scalar
+ Some minor additions to ComplexNumber. It is now possible
to do complex number multiplication without creating new
instances (calculate the real and imaginary parts
separately). Added utilities to get the unit roots.
-------------------------------------------------------------------
Sat Jan 20 10:35:19 UTC 2024 - Anton Shvetz <shvetz.anton@gmail.com>
- Update to v53.1.1
* Added
~ org.ojalgo.data
+ New ImageData class that wraps a
java.awt.image.BufferedImage and implements MatrixStore.
Further it adds a few utility methods to simplify working
with image data - convert to grey scale, re-sample (change
size), separate the colour channels…
~ org.ojalgo.matrix
+ It is now possible to create a matrix decomposition
instance and calculate the decomposition with 1 method
call. Previously you had to first call make on the factory
instance and then decompose on the decomposition instance.
Now it is possible to call decomposed directly on the
factory instance.
+ The SingularValue interface now defines a method to
reconstruct a matrix using a specified number of singular
values.
-------------------------------------------------------------------
Tue Sep 26 12:29:58 UTC 2023 - Anton Shvetz <shvetz.anton@gmail.com>
- Initial packaging with v52.0.1