Packages

case class Re(argument: ComplexFunction) extends UnaryFunction with Product with Serializable

A function which is the real part of another.

When evaluated, the result will be the real part of the result of evaluating the other function. The result will have imaginary part 0.

argument

The function of which this is the real part

Source
ComplexFunction.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, UnaryFunction, ComplexFunction, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Re
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. UnaryFunction
  7. ComplexFunction
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Re(argument: ComplexFunction)

    argument

    The function of which this is the real part

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def *(that: ComplexFunction): Multiply

    Multiplies this function by another one.

    Multiplies this function by another one.

    This creates a compound function which, when evaluated, returns the result of evaluating this function multiplied by the result of evaluating the other.

    that

    The function to be multiplied by this one

    returns

    Multiply(this, that)

    Definition Classes
    ComplexFunction
    See also

    Multiply

  4. def +(that: ComplexFunction): Add

    Adds this function to another one.

    Adds this function to another one.

    This creates a compound function which, when evaluated, returns the result of evaluating this function added to the result of evaluating the other.

    that

    The function to be added to this one

    returns

    Add(this, that)

    Definition Classes
    ComplexFunction
    See also

    Add

  5. def -(that: ComplexFunction): Subtract

    Subtracts another function from this one.

    Subtracts another function from this one.

    This creates a compound function which, when evaluated, returns the result of evaluating this function minus the result of evaluating the other.

    that

    The function to be subtracted from this one

    returns

    Subtract(this, that)

    Definition Classes
    ComplexFunction
    See also

    Subtract

  6. def /(that: ComplexFunction): Divide

    Divides this function by another one.

    Divides this function by another one.

    This creates a compound function which, when evaluated, returns the result of evaluating this function divided by the result of evaluating the other.

    that

    The function to divide this one by

    returns

    Divide(this, that)

    Definition Classes
    ComplexFunction
    See also

    Divide

  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def apply(in: Map[String, Complex]): Complex

    Evaluates the complex function, substituting in the values for each variable as given in the map.

    Evaluates the complex function, substituting in the values for each variable as given in the map.

    If the function contains a variable whose value is not given by the variable map, it will throw a VariableException.

    If no map is provided, it will be empty by default. Thus, if the function contains a variable, it will throw a VariableException.

    in

    The variable map

    returns

    The evaluated function

    Definition Classes
    UnaryFunctionComplexFunction
    Exceptions thrown

    net.totietje.complex.VariableException If the function contains a variable undefined by the map

  9. def apply(value: Complex)(implicit variable: String): Complex

    Evaluates this complex function, substituting the value for the given variable with the given value.

    Evaluates this complex function, substituting the value for the given variable with the given value.

    If the function contains a variable other than the one given, it will throw a VariableException.

    value

    The value to substitute in for the variable

    variable

    The variable whose value is to be substituted in

    returns

    The evaluated function

    Definition Classes
    ComplexFunction
    Exceptions thrown

    net.totietje.complex.VariableException If the function contains a variable other than the one given

  10. def apply(in: (String, Complex)*)(implicit default: Map[String, Complex] = Map()): Complex

    Evaluates the complex function, substituting in the values for each variable as given in the input map in the form of tuple key-value pairs.

    Evaluates the complex function, substituting in the values for each variable as given in the input map in the form of tuple key-value pairs.

    If the function contains a variable whose value is not given by input variables, it will throw a VariableException.

    If nothing is provided, it will be empty by default. Thus, if the function contains a variable, it will throw a VariableException.

    in

    The variables to substitute in

    default

    The default variable map, empty by default. If a variable is defined both by in and by defaults, the value given in in takes priority.

    returns

    The evaluated function

    Definition Classes
    ComplexFunction
    Exceptions thrown

    net.totietje.complex.VariableException If the function contains a variable whose value is not given

  11. val argument: ComplexFunction
    Definition Classes
    ReUnaryFunction
  12. def arguments: Seq[ComplexFunction]

    The input arguments of this ComplexFunction.

    The input arguments of this ComplexFunction.

    returns

    The arguments

    Definition Classes
    UnaryFunctionComplexFunction
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def derivative(implicit respect: String): ComplexFunction

    Differentiates this function.

    Differentiates this function.

    If this function is not differentiable, then it should contain NaN, such that hasNaN returns true.

    respect

    The variable to differentiate with respect to.

    Definition Classes
    ReComplexFunction
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def evaluable(implicit by: Set[String]): Boolean

    Determines whether this function contains only the provided variables, and not any other.

    Determines whether this function contains only the provided variables, and not any other.

    For this to return true, it does not need to contain all the provided variables, but it must not contain any variables other than those provided.

    If this method returns true, it means that the evaluating the function will not result in a VariableException being thrown if those variables are provided with values in the input map.

    by

    The allowed variables. The implicit conversion toSet allows the user to pass in only one String, which will be converted to a Set[String].

    returns

    true if the function does not contain any variables other than those provided

    Definition Classes
    ComplexFunction
  18. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  20. def hasNaN: Boolean

    Whether this function contains the constant NaN.

    Whether this function contains the constant NaN.

    returns

    Whether this function contains the constant NaN.

    Definition Classes
    ComplexFunction
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  25. def simplify: ComplexFunction

    Simplifies this function.

    Simplifies this function.

    The returned function should be equivalent to the old function for all inputs. Simplified functions are likely to be faster, as they remove redundant calculations.

    returns

    This function simplified

    Definition Classes
    ReComplexFunction
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. def toString: String

    Returns a string representation of this function.

    Returns a string representation of this function.

    returns

    A string representation of this function

    Definition Classes
    ReComplexFunction → AnyRef → Any
  28. def unary_-: ComplexFunction

    Negates this function.

    Negates this function.

    This creates a function which, when evaluated, returns the negative of the result of evaluating this function.

    returns

    UnaryMinus(this)

    Definition Classes
    ComplexFunction
  29. def variables: Set[String]

    Returns all the variables which this function contains.

    Returns all the variables which this function contains.

    All of these variables must be provided in order to evaluate this function.

    returns

    All the variables this function contains.

    Definition Classes
    ComplexFunction
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def ~^(that: ComplexFunction): Power

    Raises this function to the power of another one

    Raises this function to the power of another one

    This creates a compound function which, when evaluated, returns the result of evaluating this function to the power of the result of evaluating the other.

    that

    The exponent

    returns

    Power(this, that)

    Definition Classes
    ComplexFunction
    See also

    Power

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from UnaryFunction

Inherited from ComplexFunction

Inherited from AnyRef

Inherited from Any

Ungrouped