...
In this wiki page, the proposals made on the mailing-list towards the simplification of the org.apache.commons.math3.linear package will be summarized.
...
RealVector vs.
...
RealMatrix
In this section, the current (version 3.0) interfaces for vectors and matrices are compared. Vectors and matrices are two mathematical objects which are very close in nature. Their implementations should therefore be as similar as possible.
...
Methods reflecting the mathematical structure of vector spaces
The methods listed below are tagged as "essential", as they reflect the underlying mathematical structure of vector spaces.
RealVector | RealMatrix | Comments | ||
RealVector add(RealVector v) | RealMatrix add(RealMatrix m) |
| ||
| double getTrace() |
| ||
RealVector mapMultiply(double d) | RealMatrix scalarMultiply(double d) |
| ||
RealVector mapMultiplyToSelf(double d) |
|
| ||
| RealMatrix multiply(RealMatrix m) |
| ||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="aa8522ed37f01e20-49284d90-4e1a4bd6-a3e8bafa-1e889666536b5b047cd3681c"><ac:plain-text-body><![CDATA[ |
| double[] operate(double[] v) |
| ]]></ac:plain-text-body></ac:structured-macro> |
| RealVector operate(RealVector v) |
| ||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="90904c18350e281c-9f08258c-457945e6-b5b59d10-cb1f10749b4d2fe392c3a267"><ac:plain-text-body><![CDATA[ |
| double[] [RealVector] preMultiply(double[] v) |
| ]]></ac:plain-text-body></ac:structured-macro> |
| RealMatrix preMultiply(RealMatrix m) |
| ||
| RealVector preMultiply(RealVector v) |
| ||
| RealMatrix transpose() |
|
| Comparison of essential methods in interfaces RealVector and RealMatrix |
|
...
Methods reflecting the mathematical structure of euclidean space
RealVector | RealMatrix | Comments |
double cosine(RealVector v) |
|
|
double dotProduct(RealVector v) |
|
|
double getDistance(RealVector v) |
|
|
double getNorm() |
|
|
RealVector projection(RealVector v) |
|
|
void unitize() |
|
|
RealVector unitVector() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|