ojAlgo Changelog

What's new in ojAlgo 38.0

May 18, 2015
  • The first version to require Java 8!
  • org.ojalgo.access.:
  • Additions to Access1D.Fillable and Access2D.Fillable as well as Access1D.Modfiable, Access2D.Modfiable and AccessAnyD.Modfiable.
  • New interfaces Supplier1D, Supplier2D and SupplierAnyD as well as Consumer1D, Consumer2D and ConsumerAnyD.
  • org.ojalgo.array.:
  • There are new classes SparseArray, SegmentedArray and QuaternionArray.
  • Added the modifyOne-method (from the org.ojalgo.access package) to each of Array1D, Array2D and ArrayAnyD.
  • org.ojalgo.concurrent.:
  • Stopped using fork-join (directly) and reverted back to code/structure used before switching to Java 7 (v34). If you've directly referenced this package the changes are (probably) api-breaking.
  • org.ojalgo.finance.:
  • Changes to how the MarkowitzModel works when setting a target return or target variance - review the javadoc for that class before using it.
  • org.ojalgo.function.:
  • Refactored the existing interfaces and classes in this package to implement/extend as much as possible from the java.util.function package. Several abstract classes were converted to interfaces utilising default methods.
  • New FunctionSet for Quaternions named QuaternionFunction.
  • It is now possible to take a snapshot (freeze its state) of an AggregatorFunction.
  • AggregatorCollection has been renamed AggregatorSet.
  • New AggregatorSet for Quaternions named QuaternionAggregator.
  • org.ojalgo.matrix.:
  • BasicMatrix is no longer generic. This is an api-breaking change, but easy to fix. Just do a search-and-replace to get rid of the part.
  • The entire org.ojalgo.matrix.jama package has been removed - definitely api-breaking! The various matrix decomposition implementations have been moved to the org.ojalgo.matrix.decomposition package where they will be further refactored. JamaMatrix has been replaced by a new MatrixStore implementation named RawStore.
  • The method multiplyRight() in MatrixStore is deprecated and replaced by one simply named multiply(), and the same in BasicMatrix.
  • New interfaces MatrixStore.ElementsSupplier and MatrixStore.ElementsConsumer.
  • Moved all the decomposition factory methods from the various abstract classes to their corresponding interfaces. The abstract classes will be made package private in the future, and are therefore marked as deprecated (they wont actually go away).
  • The methods fillConjugated(Access2D) and fillTransposed(Access2D) in PhysicalStore are deprevated.
  • org.ojalgo.netio.:
  • The contents of a CharacterRing can now be flushed to any Appendable.
  • org.ojalgo.optimisation.:
  • The methods setMaximisation(boolean) and setMinimisation(boolean) in AbstractModel (ExpressionsBasedModel) are made protected (used to be public) and new public methods setMaximisation() and setMinimisation() are to take their place.
  • Internal refactoring related to ExpressionsBasedModel, IntegerSolver, Optimisation.Result and how these classes interact.
  • Improved the numerical capabilities of the ConvexSolver.
  • Began work to make the various solvers independant of ExpressionsBasedModel so that they more easily can be used with other modeling implementatins.
  • There are new Optimisation.Integration and Optimisation.Capabilities interfaces.
  • The method getDefaultSolver() in ExpressionsBasedModel is no longer public.
  • The solver builders can no longer take an ExpressionsBasedModel instance as input.
  • Started work on a FunctionsBasedModel. (ExpressionsBasedModel will continue to be the main modelling tool.)
  • Reimplemented the MathProgSysModel, and fixed some problems in the process.
  • The static factory method make(MathProgSysModel) in ExpressionsBasedModel is deprecated.
  • The Optimisation.Result class can no longer hold "basis" or "activeSet". Existing usage was too complicated.
  • The IntegerSolver no longer produces subproblems (node problems) with default lower and upper variable bounds. Variables with undefined lower or upper bounds now stay that way until they're brached on.
  • Tweaked the LinearSolver to handle a couple more test cases.
  • The Expression methods evaluateLessThanZero(Access1D) and evaluateMoreThanZero(Access1D) have been removed.
  • The toString() method in ExpressionsBasedModel now excludes redundant constraints (when/if a constraint expression has been identified as redundant it is no longer included).
  • Tweaked the optimisation model used in PortfolioMixer.
  • org.ojalgo.scalar.:
  • All implementations of Scalar now has a static valueOf(double) method. The methods makeReal(double) in ComplexNumber and Quaternion are deprecated.

New in ojAlgo 35.13 Snapshot (Aug 5, 2014)

  • org.ojalgo.access.*:
  • The methods isInfinite(long), isNaN(long), isPositive(long) and isReal(long) of Access1D.Elements are deprecated.
  • The methods isInfinite(long,long), isNaN(long,long), isPositive(long,long) and isReal(long,long) of Access2D.Elements are deprecated.
  • The methods isInfinite(long[]), isNaN(long[]), isPositive(long[]) and isReal(long[]) of AccessAnyD.Elements are deprecated.
  • org.ojalgo.array.*:
  • The abstract class BasicArray has been made public. It used to be package private.
  • SimpleArray and its nested subclasses SimpleArray.Big, SimpleArray,Complex, SimpleArray.Primitive and SimpleArray.Rational have been deprecated and replaced by BasicArray, BigArray, ComplexArray, PrimitiveArray and RationalArray respectively.
  • There are new classes SparseArray and SegmentedArray.
  • In Array1D the method getIndexOfLargestInRange(...) has been deprecated and replaced by indexOfLargestInRange(...). There is also a new method indexOfLargest().
  • In Array2D the methods getIndexOfLargestInRow(...) and getIndexOfLargestInColumn(...) are deprecated and replaced by indexOfLargestInRow(...) and indexOfLargestInColumn(...) respectively.
  • The method fillMatching(Array2D,BinaryFunction,Array2D) in Array2D has been removed (not deprecated, removed).
  • org.ojalgo.function.*:
  • MultiaryFunction no longer declares the methods getGradient() and getHessian(). Instead there is a new subinterface MultiaryFunction.TwiceDifferentiable that declares those two methods. Further there is a new tag interface MultiaryFunction.Convex.
  • org.ojalgo.matrix.*:
  • MatrixStore now extends Access2D.Elements.
  • MatrixStore now extends Access2D.Visitable.
  • The methods transpose() and conjugate() in MatrixStore interface now declare to return MatrixStore rather than PhysicalStore.
  • MatrixStore has new methods add(MatrixStore), subtract(MatrixStore), negate() and scale(Number).
  • org.ojalgo.netio.*:
  • A new class CharacterRing - a circular fixed size char buffer.
  • Refactored BasicLogger. Didn't bother with deprecations - just changed it. There's now a BasicLogger.Appender that is used rather than working directlywith PrintStream.
  • org.ojalgo.optimisation.*:
  • Modified/improved the presolve funtionality in ExpressionsBasedModel (the code change is actually in Expression).
  • The optimisation option (Optimisation.Options) debug_stream has been renamed debug_appender and its type changed from PrintStream to BasicLogger.Appender.
  • org.ojalgo.scalar.*:
  • Reviewed implementations and documentation for isAbsolute(), isInfinite(), isNaN(), isPositive(), isReal() and isZero() in Scalar - there are changes. Further all of those methods, except isAbsolute() and isZero(), are deprecated.

New in ojAlgo 35.0 (Jul 18, 2014)

  • org.ojalgo.access.:
  • Just about everything in ojAlgo implements one or more of the interfaces in this package - these changes affect everything.
  • The methods size(), getRowDim(), getColDim() and size(int) are deprecated and replaced with count(), countRows(), countColumns() and count(int) respectively. The new methods return long rather than int.
  • Most/all methods in the various supplementary interfaces in this package now take long rather than int arguments.
  • The Factory*D, Builder*D and Modify*D interfaces are renamed and moved to be inner interfaces of Access1D, Access2D and AccessAnyD. Each of those interfaces now has inner interfaces named Builder and Factory as well as Elements, Fillable, Modifiable and Visitable.
  • There are 3 reasons for making these changes:
  • The general change from int to long allows for much larger structures
  • The new/altered method names are better. ( Does getRowDim() return the number of rows or the dimension of a row? )
  • These changes differentiates the interfaces in this package from the java collections api.
  • org.ojalgo.array.:
  • Refactoring based on the changes in the org.ojalgo.access.* interfaces.
  • org.ojalgo.concurrent.:
  • Refactored DivideAndConquer and related classes.
  • org.ojalgo.function.:
  • Extensive refactoring in the org.ojalgo.function.multiary package.
  • Some additions to FunctionSet.
  • There is now a VoidFunction interface.
  • org.ojalgo.machine.:
  • Refactored the Hardware and VirtuakMachine classes as well altered the set of predefined Hardware.
  • org.ojalgo.matrix.:
  • Refactoring based on the changes in the org.ojalgo.access.* interfaces.
  • Minor refactoring to the classes in the org.ojalgo.matrix.operation package.
  • The PhysicalStore.Factory used to have a set of methods related to scalars. These are now deprecated and replaced by a method that returns a Scalar.Factory instance.
  • The PhysicalStore.Factory methods getFunctionSet() and getAggregatorCollection() are renamed/deprecated function() and aggregator().
  • The MatrixStore methods multiplyLeft/Right now take Access1D arguments rather than MatrixStore.
  • In PhysicalStore the various fill** methods now take Access1D arguments rather than MatrixStore.
  • In MatrixDecomposition the solve() methods now take Access2D rather than MatrixStore as the RHS.
  • org.ojalgo.optimiation.:
  • The package org.ojalgo.optimisation.linear.mps has been moved/renamed org.ojalgo.optimisation.mps.
  • The Optimisation.Options option solution has been split in to; solution, objective and integer. Check the javadoc for descriptions of what they do.
  • The presolve functionality of ExpressionsBasedModel has been improved.
  • Refactoring and improvements to the IntegerSolver.
  • All models and model entities now have a destroy() method that clears/nullifies the internal data structures to help garbage collection.
  • The solve() method of ExpressionsBasedModel no longer writes the solver's solution back to the model's variables. If you want that to happen you should instead use minimise() or maximise().
  • org.ojalgo.scalar.:
  • The methods hashCode() and equals(Object) are re-implemented. There used to be common methods (in an abstract superclass) used by all Scalar implementors. Now each implemenation class has its own type-specific version of those methods.
  • The implementation logic of isAbsolute(), isPositive(), isReal... are now factored out into static methods available to other parts of ojAlgo without actually creating Scalar instances.
  • There is now a Scalar.Factory interface and each of the Scalar implementation has a public static FACTORY field. The PhysicalStore.Factory used to have set of methods related to scalars. These are now replaced by a method that returns a Scalar.Factory instance.
  • The enforce(NumberContext) and round(NumberContext) methods have been removed from the Scalar interface. Instead each of the implementations implement the new NumberContext.Enforceable interface.
  • There is a new Scalar implementation Quaternion.
  • The methods getReal(), getImaginary(), getModulus() and getArgument() have been removed from the interface Scalar and all the implementations except (of course) ComplexNumber. There is instead a new method norm() to replace getModulus() and compliment the already existing signum().
  • The methods toComplexNumber() and toRationalNumber() have been removed from the Scalar interface.
  • The methods power(int) and root(int) have been removed,
  • org.ojalgo.series.:
  • SeriesInterpolator now (internally) uses BigDecimal as series keys.
  • org.ojalgo.type.:
  • IntCount can now be incremented and duplicated is addition to (as before) decrenented and halved.
  • TypeContext is now an interface, and there is a new GenericContext class.
  • There is now an interface NumberContext.Enforceable. The various Scalar implementations implement it.
  • The 3 methods isSmallComparedTo(double,double), isSmallError(double,double) and isZero(double) in NumberContext have altered implementations/behaviour.
  • The method error() in NumberContext is deprecated. You should use isSmallComparedTo(double,double), isSmallError(double,double) or isZero(double) instead.
  • The enforce(BigDecimal) of NumberContext no longer does "stripTrailingZeros" before returning.

New in ojAlgo 34.0 (Jun 28, 2013)

  • org.ojalgo.access:
  • Added new interfaces Modify1D, Modify2D and ModifyAnyD as well as Builder1D, Builder2D and BuilderAnyD.
  • The interface Basic2D has been removed. BasicMatrix now extends Access2D.
  • Some internal refactoring...
  • org.ojalgo.array:
  • The various array classes now implement the new Modify*D interfaces from the org.ojalgo.access package.
  • Array1D now has a copy(int...) method - that will create a copy containing only the indicated elements.
  • org.ojalgo.concurrent:
  • The class DivideAndMerge is deprecated.
  • DivideAndConquer is sligthly refactored. There are new methods execute(...) and invoke(...) that you should use to initiate calculations. The method divide(...) is no longer public.
  • DaemonPoolExecutor now extends ForkJoinPool rather than ThreadPoolExecutor.
  • org.ojalgo.constant:
  • New constant TINY (≈1.6E-291) in PrimitiveMath.
  • org.ojalgo.finance:
  • FinancePortfolio has two new methods getLossProbabilty() and getLossProbabilty(horizon).
  • MarkowitzModel now has a constructor that simply takes a covariance matrix and a returns matrix as input. Also some internal refactoring/tidying.
  • Fix for GoogleSymbol to handle the "-" that is used in place for missing values.
  • New method clean() in MarketEquilibrium that copies the instance and at same time cleans the covariance matrix of negative and very small eigenvalues.
  • Fixed so that there wont be an exception when calling nomalise() on a FinancePortfolio that has all weights set to zero.
  • The PortfolioMixer now takes Number instead of BigDecimal when specifying constaints.
  • The enum MarketEquilibium.CalibrationTarget has been removed
  • Additional refactoring...
  • org.ojalgo.function:
  • The previous interface BinaryFunction and abstract class ConfigurableBinaryFunction has been combined into a new abstract class BinaryFunction.
  • The previous interface ParameterFunction and abstract class ConfigurableParameterFunction has been combined into a new abstract class ParameterFunction.
  • All classes in org.ojalgo.function.implementation have moved to org.ojalgo.function. The old package/classes still exists but everything is deprecated. You (only) need to change the import statement!
  • New AggregatorFunction:s MINIMUM and MAXIMUM. The ComplexNumber implementations do the same as SMALLEST and LARGEST.
  • org.ojalgo.matrix:
  • Updated the included version of Jama to 1.03. There was a bug in the Jama's EigenvalueDecomposition that caused the new release.
  • Fixed a bug with the SVD that caused it to hang with some special matrices.
  • Fixed the EigenvalueDecomposition: It did not allow extraction of the eigenvalues and the diagonal matrix when/if you had specified "eigenvalues only".
  • The QRDecomposition, BidiagonalDecomposition and SingularValueDecomposition can now be computed as "full size" - useful if you want to calculate the nullspace of a matrix.
  • Householder implemenattions now have a copy finction that uses a precalculated "beta".
  • BasicMatrix is now generic, and extends Access2D.
  • API-breaking changes to BasicMatrix.Factory and the related builders (not difficult to fix) - they now implement the new Builder2D interface.
  • org.ojalgo.optimisation:
  • Optimisation.Result has a new constructor, and there's now options to set a basis and active set as
  • The method getDefaultSolver() in Optimisation.Model has been removed. The implementation i ExpressionsBasedModel is still there.
  • The set of methods named selectExpressions**() and selectVariables**() in ExpressionsBasedModel are refactored in many ways. This is api-breaking changes, but those methods are primarily used when creating solver instances from a model - not something an average user would do.
  • ExpressionsBasedModel is refactored (internal changes only) to generate solver specific data structures faster.
  • ExpressionsBasedModel no longer includes fixed (equality constrained) variables when creating solver instances.
  • The IntegerSolver has been improved some: less copying / less garbage, branches are now stopped based on a configurable relative MIP gap, and other minor improvements...
  • Various refactoring to Optimisation.Options - name changes, changed default values, additions, removals... - API breaking!
  • Optimisation.Options can now be set/defined on the ExpressionsBasedModel, and they will be passed on to the solver.
  • The Optimisation.ValidationException has been removed, and code that relied on it has been refactored - API breaking!
  • IntegerSolver should now has a mechanism to "hot start" the calculation nodes. It's not actually implemented for the LP solver yet, but the QP-solver is done, and it's generally much faster now.
  • Better defaults for many of the parameters in Optimisation.Options.
  • The LinearSolver can now handle more cases.
  • ... actually there's a whole bunch of refactoring and improvements that I lost track of. Particularily the IntegerSolver should be much more efficient now.
  • org.ojalgo.scalar:
  • Internal refactoring to ComplexNumber. It should now be significantly faster on some operations. The public constructor taking a single double as input has been removed. The class is now abstract. Instead of that construcor you should use the static factory method makeReal(double).
  • org.ojalgo.type:
  • New standard types, in StandardType; MATH_032, MATH, 064 and MATH_128, and a couple of new factory methods in NumberContext.

New in ojAlgo 30.1 (Jun 27, 2011)

  • org.ojalgo.function.*
  • Fixed a bug with LinearFunction that made it impossible to create instances using some of the factory methods.
  • org.ojalgo.optimisation.*
  • Refactoring to the ModelEntity hierarchy. Models are now also model entities themselves. Nothing api-breaking yet, but I expect there will be.
  • org.ojalgo.type.*
  • Changed the specifications of the KeyValue interface (again) and refactored the implementations.

New in ojAlgo 28.31 (Jan 19, 2010)

  • The previously announced changes (deprecations) related to the org.ojalgo.matrix.factory has been performed. At least in terms of import statements this affects large parts of ojAlgo and probably your code as well. There is now a "new" class MatrixFactory.
  • The PhysicalStore.Factory interface has gotten two new methods - copyTransposed(MatrixStore) and copyConjugated(MatrixStore).
  • 2 new methods in MatrixStore - transpose() and conjugate() - that produce transposed/conjugated PhysicalStore copies of the MatrixStore.
  • The Householder-related code in the PhysicalStore implementations is now dual/multi-threaded.
  • The Rotation-related code in the PhysicalStore implementations have been tweaked. (Roughly the same speed, but cleaner code.)
  • New SingleStore (it existed before, but was not public).
  • SuperimposedMatrixStore has been renamed/deprecated SuperimposedStore.
  • RawStore has been deprecated. Use JamaMatrix instead.
  • Internal changes to BigMatrix, ComplexMatrix and PrimitiveMatrix.
  • A bit of (internal) tweaking of all the MatrixStore implementations.
  • New methods maxpy(), raxpy() and caxpy() in PhysicalStore. ;-)
  • New class MatrixStore.Builder.

New in ojAlgo 26.20 (Mar 20, 2009)

  • org.ojalgo.array:
  • Array1Dim now implements the List interface. This makes the toList() method redundant, and it has therefore been deprecated.
  • There are now two different modifyMatching() methods - varying in which array's elements make up which function arguments - in all classes in this package. There used to be only one variant, and that one wasn't available in some classes.
  • New class ArrayUtils. It contains utility methods to allow you to work with double[][] arrays the same way you use ojAlgo arrays. This simplified the task of making JamaMatrix implement PhysicalStore.
  • Many methods have changed from being public to protected, and from final to "not final". This is largely/entirely an internal change. It doesn't affect the public api of any class that users could instantiate directly.
  • The visit-methods no longer call reset() on the visitor. You are responsibel for resetting. If you get the AggregatorFunction from the threadlocal collection it is reset when you get it.
  • org.ojalgo.function:
  • All UnaryFunction, BinaryFunction, ParameterFunction and AggregatorFunction each have two invioke-methods - one that operates on primitive double and one that operates on reference types (number subclasses). Previously only one of them should be implemented and you got a RuntimeException if you called the other one. Now the one that isn't (directly) implemented delegates to the other.
  • The classes BigFunction, ComplexFunction and PrimitiveFunction can now be instantiated as singletons, and they all inherit from a new common class FunctionSet.
  • The classes BigAggregator, ComplexAggregator and PrimitiveAggregator now each have a ThreadLocal that returns an AggregatorFunction.Collection. They used to have (now deprecated) one ThreadLocal for each aggregator.
  • New AggregatorFunction SMALLEST that finds the smallest non-zero absolute value in an array/matrix.
  • org.ojalgo.matrix:
  • There's been a couple of changes to BasicMatrix. The method getVectorProduct(BasicMatrix) has been renanamed (deprecated) multiplyVectors(BasicMatrix), and the return type of toListOfElements() has been changed from List to List