org.matheclipse.core.expression
Class ExprFieldElement
- java.lang.Object
-
- org.matheclipse.core.expression.ExprFieldElement
-
- All Implemented Interfaces:
- java.lang.Comparable<ExprFieldElement>, FieldElement<ExprFieldElement>
public class ExprFieldElement extends java.lang.Object implements FieldElement<ExprFieldElement>, java.lang.Comparable<ExprFieldElement>
-
-
Constructor Summary
Constructors Constructor and Description ExprFieldElement(IExpr v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ExprFieldElementadd(ExprFieldElement a)Compute this + a.intcompareTo(ExprFieldElement o)ExprFieldElementdivide(ExprFieldElement a)Compute this ÷ a.booleanequals(java.lang.Object obj)IExprgetExpr()Field<ExprFieldElement>getField()Get theFieldto which the instance belongs.inthashCode()ExprFieldElementmultiply(ExprFieldElement a)Compute this × a.ExprFieldElementmultiply(int a)Compute n × this.ExprFieldElementnegate()Returns the additive inverse ofthiselement.ExprFieldElementreciprocal()Returns the multiplicative inverse ofthiselement.ExprFieldElementsubtract(ExprFieldElement a)Compute this - a.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ExprFieldElement
public ExprFieldElement(IExpr v)
-
-
Method Detail
-
add
public ExprFieldElement add(ExprFieldElement a)
Description copied from interface:FieldElementCompute this + a.- Specified by:
addin interfaceFieldElement<ExprFieldElement>- Parameters:
a- element to add- Returns:
- a new element representing this + a
-
compareTo
public int compareTo(ExprFieldElement o)
- Specified by:
compareToin interfacejava.lang.Comparable<ExprFieldElement>
-
divide
public ExprFieldElement divide(ExprFieldElement a) throws java.lang.ArithmeticException
Description copied from interface:FieldElementCompute this ÷ a.- Specified by:
dividein interfaceFieldElement<ExprFieldElement>- Parameters:
a- element to divide by- Returns:
- a new element representing this ÷ a
- Throws:
MathArithmeticException- ifais zerojava.lang.ArithmeticException
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getExpr
public final IExpr getExpr()
-
getField
public Field<ExprFieldElement> getField()
Description copied from interface:FieldElementGet theFieldto which the instance belongs.- Specified by:
getFieldin interfaceFieldElement<ExprFieldElement>- Returns:
Fieldto which the instance belongs
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
multiply
public ExprFieldElement multiply(ExprFieldElement a)
Description copied from interface:FieldElementCompute this × a.- Specified by:
multiplyin interfaceFieldElement<ExprFieldElement>- Parameters:
a- element to multiply- Returns:
- a new element representing this × a
-
multiply
public ExprFieldElement multiply(int a)
Description copied from interface:FieldElementCompute n × this. Multiplication by an integer number is defined as the following sumn × this = ∑i=1n this. - Specified by:
multiplyin interfaceFieldElement<ExprFieldElement>- Parameters:
a- Number of timesthismust be added to itself.- Returns:
- A new element representing n × this.
-
negate
public ExprFieldElement negate()
Description copied from interface:FieldElementReturns the additive inverse ofthiselement.- Specified by:
negatein interfaceFieldElement<ExprFieldElement>- Returns:
- the opposite of
this.
-
reciprocal
public ExprFieldElement reciprocal()
Description copied from interface:FieldElementReturns the multiplicative inverse ofthiselement.- Specified by:
reciprocalin interfaceFieldElement<ExprFieldElement>- Returns:
- the inverse of
this.
-
subtract
public ExprFieldElement subtract(ExprFieldElement a)
Description copied from interface:FieldElementCompute this - a.- Specified by:
subtractin interfaceFieldElement<ExprFieldElement>- Parameters:
a- element to subtract- Returns:
- a new element representing this - a
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG