org.matheclipse.core.convert
Class Convert
- java.lang.Object
-
- org.matheclipse.core.convert.Convert
-
public class Convert extends java.lang.ObjectConversions between an IExpr object and misc other object class types
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static IExprdoubleToExprTranspose(double[][] dd)static FieldMatrix<ExprFieldElement>list2Matrix(IAST listMatrix)Returns a FieldMatrix if possible.static RealMatrixlist2RealMatrix(IAST listMatrix)Returns a RealMatrix if possible.static RealVectorlist2RealVector(IAST listVector)static FieldVector<ExprFieldElement>list2Vector(IAST listVector)static IASTmatrix2List(FieldMatrix<ExprFieldElement> matrix)Converts a FieldMatrix to the list expression representation.static IExprpolynomialFunction2Expr(double[] coefficients, ISymbol sym)Converts an array of coefficients into the (polynomial) expression representation.static IExprpolynomialFunction2Expr(PolynomialFunction pf, ISymbol sym)Converts a PolynomialFunction to the (polynomial) expression representation.static IASTrealMatrix2List(RealMatrix matrix)Converts a RealMatrix to the list expression representation.static IASTrealVector2List(RealVector vector)Convert a RealVector to a IAST list.static IASTvector2List(FieldVector<ExprFieldElement> vector)Convert a FieldVector to a IAST list.
-
-
-
Method Detail
-
doubleToExprTranspose
public static IExpr doubleToExprTranspose(double[][] dd)
-
list2Matrix
public static FieldMatrix<ExprFieldElement> list2Matrix(IAST listMatrix) throws java.lang.ClassCastException, java.lang.IndexOutOfBoundsException
Returns a FieldMatrix if possible.- Parameters:
listMatrix-- Returns:
- Throws:
java.lang.ClassCastExceptionjava.lang.IndexOutOfBoundsException
-
matrix2List
public static IAST matrix2List(FieldMatrix<ExprFieldElement> matrix)
Converts a FieldMatrix to the list expression representation.- Parameters:
matrix-- Returns:
-
list2RealMatrix
public static RealMatrix list2RealMatrix(IAST listMatrix) throws java.lang.ClassCastException, java.lang.IndexOutOfBoundsException
Returns a RealMatrix if possible.- Parameters:
listMatrix-- Returns:
- a RealMatrix or
nullif the given list is no matrix. - Throws:
java.lang.ClassCastException- if not all elements are convertable to adoublevalue.java.lang.IndexOutOfBoundsException
-
realMatrix2List
public static IAST realMatrix2List(RealMatrix matrix)
Converts a RealMatrix to the list expression representation.- Parameters:
matrix-- Returns:
-
list2Vector
public static FieldVector<ExprFieldElement> list2Vector(IAST listVector) throws java.lang.ClassCastException, java.lang.IndexOutOfBoundsException
- Throws:
java.lang.ClassCastExceptionjava.lang.IndexOutOfBoundsException
-
list2RealVector
public static RealVector list2RealVector(IAST listVector) throws java.lang.ClassCastException, java.lang.IndexOutOfBoundsException
- Throws:
java.lang.ClassCastExceptionjava.lang.IndexOutOfBoundsException
-
vector2List
public static IAST vector2List(FieldVector<ExprFieldElement> vector)
Convert a FieldVector to a IAST list.- Parameters:
vector-- Returns:
-
realVector2List
public static IAST realVector2List(RealVector vector)
Convert a RealVector to a IAST list.- Parameters:
vector-- Returns:
-
polynomialFunction2Expr
public static IExpr polynomialFunction2Expr(PolynomialFunction pf, ISymbol sym)
Converts a PolynomialFunction to the (polynomial) expression representation.- Parameters:
pf- the polynomial functionsym- the name of the polynomial functions variable- Returns:
-
polynomialFunction2Expr
public static IExpr polynomialFunction2Expr(double[] coefficients, ISymbol sym)
Converts an array of coefficients into the (polynomial) expression representation.- Parameters:
coefficients- the coefficients of the polynomial functionsym- the name of the polynomial functions variable- Returns:
-
-
DMelt 3.0 © DataMelt by jWork.ORG