Negate
Negate is a specific implementation of the ExpressionMonoFunction that changes the sign of a numeric value.
This object represents the mathematical negation operation ("-") applied to a numeric input. It uses the negate method, which evaluates the negation of a given Number while handling specific cases like imaginary numbers and converting non-pure factors to PureNumber form as necessary.
The function is exact and operates lazily.
Attributes
- Graph
-
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalsclass ExpressionMonoFunctiontrait ExpressionFunction[Eager]class Objecttrait Matchableclass AnyShow all
- Self type
-
Negate.type
Members list
Type members
Inherited types
The names of the product elements.
The names of the product elements.
Attributes
- Inherited from:
- Singleton
Attributes
- Inherited from:
- Singleton
The mirrored *-type.
The mirrored *-type.
Attributes
- Inherited from:
- Singleton
Attributes
- Inherited from:
- Singleton
Inherited and Abstract types
The name of the type.
The name of the type.
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Applies an exact mathematical operation to negate certain types of exact numeric Valuables. This method specifically handles cases where the input is a Real containing an ExactNumber with either a PureNumber or Radian factor.
Applies an exact mathematical operation to negate certain types of exact numeric Valuables. This method specifically handles cases where the input is a Real containing an ExactNumber with either a PureNumber or Radian factor.
Value parameters
- x
-
the input Valuable to which the exact operation is applied. Only Valuables matching predefined patterns are processed; others return
None.
Attributes
- Returns
-
an
Option[Valuable]containing the negatedValuableif the input matches the expected pattern, otherwiseNone.
Ignores the specified context and returns AnyScalar.
Ignores the specified context and returns AnyScalar.
Value parameters
- context
-
ignored.
Attributes
- Returns
-
a
Contextobject derived from or related to the providedcontext.
Inherited methods
Composes two instances of Function1 in a new Function1, with this function applied first.
Composes two instances of Function1 in a new Function1, with this function applied first.
Type parameters
- A
-
the result type of function
g
Value parameters
- g
-
a function R => A
Attributes
- Returns
-
a new function
fsuch thatf(x) == g(apply(x)) - Inherited from:
- Function1
Evaluate this function on Valuable x.
Evaluate this function on Valuable x.
Value parameters
- x
-
the parameter to the function.
Attributes
- Returns
-
the result of f(x).
- Inherited from:
- ExpressionMonoFunction
Applies the mathematical operation encapsulated by this ExpressionMonoFunction to the given complex number. The operation is determined based on the specific subtype or case of this function instance.
Applies the mathematical operation encapsulated by this ExpressionMonoFunction to the given complex number. The operation is determined based on the specific subtype or case of this function instance.
Value parameters
- z
-
the input complex number of type
algebra.eager.Complexto which the operation will be applied
Attributes
- Returns
-
an
Option[Eager]containing the result of applying the operation as anEagerinstance, orNoneif the operation is not supported for this function instance - Inherited from:
- ExpressionMonoFunction
Composes two instances of Function1 in a new Function1, with this function applied last.
Composes two instances of Function1 in a new Function1, with this function applied last.
Type parameters
- A
-
the type to which function
gcan be applied
Value parameters
- g
-
a function A => T1
Attributes
- Returns
-
a new function
fsuch thatf(x) == apply(g(x)) - Inherited from:
- Function1
Evaluates the given Expression in the specified Context and attempts to derive an Eager result. This method relies on the Expression being evaluated as-is and applies this function's exact logic if applicable.
Evaluates the given Expression in the specified Context and attempts to derive an Eager result. This method relies on the Expression being evaluated as-is and applies this function's exact logic if applicable.
CONSIDER the alternative version (commented out) which seems like it should be correct but isn't.
Value parameters
- a
-
the
Expressionto be evaluated. - context
-
the
Contextwithin which the evaluation is performed.
Attributes
- Returns
-
an
Option[Eager]containing the result of the evaluation if successful, orNoneotherwise. - Inherited from:
- ExpressionMonoFunction
Creates a new instance of type T with elements taken from product p.
Creates a new instance of type T with elements taken from product p.
Attributes
- Inherited from:
- Singleton
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Generate helpful debugging information about this ExpressionMonoFunction.
Generate helpful debugging information about this ExpressionMonoFunction.
Attributes
- Returns
-
a String.
- Definition Classes
- Inherited from:
- ExpressionMonoFunction
Inherited fields
Attributes
- Inherited from:
- ExpressionMonoFunction
Returns the name of the expression function.
Returns the name of the expression function.
Attributes
- Returns
-
a string representing the name of the function
- Inherited from:
- ExpressionMonoFunction
Attributes
- Inherited from:
- ExpressionMonoFunction