Orbital library

orbital.math
Class Values

java.lang.Object
  extended by orbital.math.Values
All Implemented Interfaces:
ValueFactory

public abstract class Values
extends java.lang.Object
implements ValueFactory

Manager for scalar value and arithmetic object value constructor factories. Manages the current value factories of your system.

Simple applications will generally use getDefault() to get the current system default value factory. While applications that require more control over the particular arithmetic object implementations will get their own instance and configure it according to their needs.

Properties: math implementation settings
Property Name Property Value
orbital.math.Values.implementation class name of the ValuesFactory implementation used for creating values and thus returned by getInstance().
orbital.math.Values.default class name of the initial default ValueFactory instance returned by getDefault(). If not set defaults to value of orbital.math.Values.implementation.
These properties allow a different vendor's factory implementation of arithmetic objects to be "plugged in".

Author:
André Platzer
See Also:
ValueFactory

Constructor Summary
protected Values()
           
 
Method Summary
static ValueFactory getDefault()
          Get the (single) default value factory instance.
static Values getDefaultInstance()
          Get the (single) default instance of this factory.
static ValueFactory getInstance()
          Returns a new value factory with default settings.
static ValueFactory getInstance(java.util.Map parameters)
          Returns a new value factory with specified settings.
static boolean isPrimitiveWrapper(java.lang.Class clazz)
          Determines whether the specified class is an (old JDK1.0) wrapper for a primitive type.
static void setDefault(ValueFactory newValueFactory)
          Set the (single) default value factory instance.
static void setDefaultInstance(Values newValueFactory)
          Set the (single) default instance of this factory.
static java.lang.Number toPrimitiveWrapper(Scalar val)
          Returns a primitive type wrapper for the specified scalar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface orbital.math.ValueFactory
asPolynomial, asPolynomial, asTensor, asVector, asVector, asVector, BASE, cartesian, cartesian, complex, complex, complex, complex, complex, complex, complex, CONST, constant, constant, constant, constant, constant, DIAGONAL, E, fraction, fraction, getCoercer, getCoercer, getNormalizer, i, I, IDENTITY, IDENTITY, INFINITY, MINUS_ONE, MONOMIAL, MONOMIAL, MONOMIAL, MONOMIAL, MONOMIAL, MONOMIAL, NaN, narrow, NEGATIVE_INFINITY, newInstance, newInstance, newInstance, newInstance, ONE, parse, PI, polar, polar, polynomial, polynomial, polynomial, polynomial, polynomial, POSITIVE_INFINITY, quotient, quotient, quotient, quotient, quotient, quotient, quotient, rational, rational, rational, rational, setCoercer, setCoercer, setNormalizer, symbol, tensor, tensor, tensor, tensor, tensor, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, ZERO, ZERO, ZERO, ZERO, ZERO
 

Constructor Detail

Values

protected Values()
Method Detail

getInstance

public static ValueFactory getInstance()
Returns a new value factory with default settings.

See Also:
"FacadeFactory", getInstance(Map)

getInstance

public static ValueFactory getInstance(java.util.Map parameters)
Returns a new value factory with specified settings.

Parameters:
parameters - a map containing settings for string parameters configuring the behaviour of the value factory. These settings configure the value factory implementation instantiated. The precise effect of parameters are therefore implementation-dependent. Some parameters, however, have a standard semantics. Implementations do not need to provide all combinations of parameters, though.
Parameters: value factory implementation standard settings
Parameter Name Parameter Value
orbital.math.Vector.sparse Whether vectors use a sparse (=store only non-zero components with location) or dense (=store all components without locations) representation for their components.
orbital.math.Matrix.sparse Whether matrices use a sparse (=store only non-zero components with location) or dense (=store all components without locations) representation for their components.
orbital.math.Tensor.sparse Whether tensors use a sparse (=store only non-zero components with location) or dense (=store all components without locations) representation for their components.
orbital.math.Polynomial.sparse Whether polynomials use a sparse (=store only non-zero coefficients with exponents) or dense (=store all coefficients without exponents) representation for their coefficients.
orbital.math.Polynomial.recursive Whether multivariate polynomials use a recursive (f.ex. (y2+2y+3)x2 + (2y2-1)x + (-2y+1)1 as R[X0][X1]...[Xn-1]) or distributive (f.ex. x2y2+2x2y+2xy2+3x2-x-2y+1 as R(N(I))) representation.
orbital.math.UnivariatePolynomial.sparse Whether univariate polynomials use a sparse (=store only non-zero coefficients with exponents) or dense (=store all coefficients without exponents) representation for their coefficients.
orbital.math.Fraction.normalize Use "lazy" for lazy normalization only when representative or query is invoked, "eager" for eager normalization after each operation.
orbital.math.Quotient.normalize Use "lazy" for lazy normalization only when representative or query is invoked, "eager" for eager normalization after each operation.
orbital.math.Scalar.narrow Use "auto" for automatic narrowing after each operation, "none" for explicit normalization, only.
orbital.math.Scalar.precision
  • "big" for sticking to arbitrary big precision.
  • "auto" for automatic fallback to bigger precision when result could otherwise overflow
  • "dynamic" sticks to machine-size for initially machine-sized numbers at the risk of overflows and uses big precision during big precision computations.
  • "machine" always sticks to machine-size at the risk of overflows regardless of their source (even bigs are reduced to machine size).
See Also:
"FacadeFactory"

getDefaultInstance

public static final Values getDefaultInstance()
Get the (single) default instance of this factory.

This is the old name for getDefault().

See Also:
"Singleton", "FacadeFactory", setDefault(ValueFactory)

getDefault

public static final ValueFactory getDefault()
Get the (single) default value factory instance.

This is the new name for getDefaultInstance().

See Also:
"Singleton", "FacadeFactory", setDefault(ValueFactory)

setDefaultInstance

public static final void setDefaultInstance(Values newValueFactory)
Set the (single) default instance of this factory.

Since changing the default factory may affect many different areas of functionality, this method should only be used if the caller is prepared to reinitialize values which ought to use the new kind of factory.

Parameters:
newValueFactory - the new default value factory of this Virtual Machine.
See Also:
getDefault()

setDefault

public static final void setDefault(ValueFactory newValueFactory)
Set the (single) default value factory instance.

This is the new name for setDefaultInstance(Values).

See Also:
getDefault()

isPrimitiveWrapper

public static boolean isPrimitiveWrapper(java.lang.Class clazz)
Determines whether the specified class is an (old JDK1.0) wrapper for a primitive type. Legacy query method.

See Also:
Class.isPrimitive(), Integer, Long, Double, Float, Byte, Short

toPrimitiveWrapper

public static java.lang.Number toPrimitiveWrapper(Scalar val)
Returns a primitive type wrapper for the specified scalar. Legacy conversion method. Determines whether the specified class is an (old JDK1.0) wrapper for a primitive type.

See Also:
ValueFactory.valueOf(Number), isPrimitiveWrapper(Class)

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.