sealed trait ComplexFunction extends AnyRef
This represents a function of complex variables. It can be evaluated using a map of the variables and their values. The function will then be evaluated, substituting in each variable's respective value, returning a complex number as its output.
- Source
- ComplexFunction.scala
- See also
- Alphabetic
- By Inheritance
- ComplexFunction
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
apply(in: Map[String, Complex] = Map()): 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, empty by default
- returns
The evaluated function
- Exceptions thrown
net.totietje.complex.VariableException
If the function contains an undefined variable
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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)
- See also
-
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)
- See also
-
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)
- See also
-
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)
- See also
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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
- ComplexFunction → AnyRef → Any
-
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)
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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)
- See also
This is the documentation for the Evaluator project (see GitHub).
The main package net.totietje.evaluator. The net.totietje.complex package contains an example usage of this package, which may also be useful.