|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.ext.mma.algebra.MathematicaSolver<V>
V
- the variable type.public class MathematicaSolver<V>
This class is used to solve systems of linear equations using Mathematica.
Constructor Summary | |
---|---|
MathematicaSolver(java.lang.String kernelLinkCmd)
Creates a new linear system solver. |
|
MathematicaSolver(java.lang.String[] kernelLinkArgs)
Creates a new linear system solver. |
Method Summary | |
---|---|
void |
close()
Closes the link to the Mathematica kernel. |
protected void |
finalize()
Calls close() . |
static void |
main(java.lang.String[] args)
Used for testing purposes. |
LinearSystemSolution<V> |
solve(java.util.Map<LinearComb<V>,java.lang.Double> equations)
Computes and returns a solution to the provided system of linear equations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MathematicaSolver(java.lang.String[] kernelLinkArgs)
kernelLinkArgs
- the argument for the Mathematica JLink method
MathLinkFactory.createKernelLink(String[]).
ExternalSoftwareException
- if a MathLinkException
is
thrown.public MathematicaSolver(java.lang.String kernelLinkCmd)
kernelLinkCmd
- the argument for the Mathematica JLink method
MathLinkFactory.createKernelLink(String).
MathematicaException
- if a MathLinkException
is
thrown.Method Detail |
---|
public static void main(java.lang.String[] args)
args
- ignored.public void close()
protected void finalize() throws java.lang.Throwable
close()
.
finalize
in class java.lang.Object
java.lang.Throwable
public LinearSystemSolution<V> solve(java.util.Map<LinearComb<V>,java.lang.Double> equations)
solve
in interface LinearSystemSolver<V>
equations
- linear combinations each mapped to a Double
.
Each key-value pair represents the left and right hand sides,
respectively, of an equation.
MathematicaException
- if a MathLinkException
is
thrown.
java.lang.IllegalStateException
- if close()
has already been called.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |