object ComplexFunction
A companion object for the ComplexFunction
trait.
This contains all the subclasses of the sealed ComplexFunction
class, and
implicit conversions.
- Source
- ComplexFunction.scala
- Alphabetic
- By Inheritance
- ComplexFunction
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
Abs
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the absolute of another.
A function which is the absolute of another.
When evaluated, the result will be the absolute of the result of evaluating the other function. Since the absolute only returns real numbers, the result will have imaginary part 0.
- z
The function of which this is the absolute
-
case class
Acos
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the inverse cosine of another.
A function which is the inverse cosine of another.
When evaluated, the result will be the inverse cosine of the result of evaluating the other function.
- z
The function of which this is the inverse cosine
-
case class
Acosh
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the inverse hyperbolic cosine of another.
A function which is the inverse hyperbolic cosine of another.
When evaluated, the result will be the inverse hyperbolic cosine of the result of evaluating the other function.
- z
The function of which this is the inverse hyperbolic cosine
-
case class
Add
(a: ComplexFunction, b: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which adds together two other functions.
A function which adds together two other functions.
When evaluated, the result will be the result of evaluating one function added to the result of evaluating the other.
- a
One of the two functions to be added
- b
The other of the two functions to be added
-
case class
Arg
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the argument of another.
A function which is the argument of another.
When evaluated, the result will be the argument of the result of evaluating the other function. Since the argument only returns real numbers, the result will have imaginary part 0.
- z
The function of which this is the argument
-
case class
Asin
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the inverse sine of another.
A function which is the inverse sine of another.
When evaluated, the result will be the inverse sine of the result of evaluating the other function.
- z
The function of which this is the inverse sine
-
case class
Asinh
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the inverse hyperbolic sine of another.
A function which is the inverse hyperbolic sine of another.
When evaluated, the result will be the inverse hyperbolic sine of the result of evaluating the other function.
- z
The function of which this is the inverse hyperbolic sine
-
case class
Atan
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the inverse tangent of another.
A function which is the inverse tangent of another.
When evaluated, the result will be the inverse tangent of the result of evaluating the other function.
- z
The function of which this is the inverse tangent
-
case class
Atanh
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the inverse hyperbolic tangent of another.
A function which is the inverse hyperbolic tangent of another.
When evaluated, the result will be the inverse hyperbolic tangent of the result of evaluating the other function.
- z
The function of which this is the inverse hyperbolic tangent
-
case class
Conj
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the conjugate of another.
A function which is the conjugate of another.
When evaluated, the result will be the conjugate of the result of evaluating the other function, that is, it will have the same real part but a negated imaginary part.
- z
The function of which this is the conjugate
-
case class
Constant
(z: Complex) extends ComplexFunction with Product with Serializable
A constant which, when evaluated, always returns the same value.
A constant which, when evaluated, always returns the same value.
- z
The value that this constant represents
-
case class
Cos
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the cosine of another.
A function which is the cosine of another.
When evaluated, the result will be the cosine of the result of evaluating the other function.
- z
The function of which this is the cosine
-
case class
Cosh
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the hyperbolic cosine of another.
A function which is the hyperbolic cosine of another.
When evaluated, the result will be the hyperbolic cosine of the result of evaluating the other function.
- z
The function of which this is the hyperbolic cosine
-
case class
Divide
(a: ComplexFunction, b: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which divides one function by another.
A function which divides one function by another.
When evaluated, the result will be the result of evaluating one function divided by the result of evaluating the other.
- a
The dividend
- b
The divisor
-
case class
Im
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the imaginary part of another.
A function which is the imaginary part of another.
When evaluated, the result will be the imaginary part of the result of evaluating the other function. The result will have imaginary part 0, and its real part will be equal to the imaginary part of the other function.
- z
The function of which this is the imaginary part
-
case class
Log
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the natural logarithm of another.
A function which is the natural logarithm of another.
When evaluated, the result will be the natural logarithm of the result of evaluating the other function.
- z
The function of which this is the natural logarithm
-
case class
Multiply
(a: ComplexFunction, b: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which multiplies one function by another.
A function which multiplies one function by another.
When evaluated, the result will be the result of evaluating one function multiplied by the result of evaluating the other.
- a
The first function to be multiplied
- b
The second function to be multiplied
-
case class
Power
(a: ComplexFunction, b: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which raises one function to the power of another.
A function which raises one function to the power of another.
When evaluated, the result will be the result of evaluating one function to the power of the result of evaluating the other.
- a
The base
- b
The exponent
-
case class
Re
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the real part of another.
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.
- z
The function of which this is the real part
-
case class
Sin
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the sine of another.
A function which is the sine of another.
When evaluated, the result will be the sine of the result of evaluating the other function.
- z
The function of which this is the sine
-
case class
Sinh
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the hyperbolic sine of another.
A function which is the hyperbolic sine of another.
When evaluated, the result will be the hyperbolic sine of the result of evaluating the other function.
- z
The function of which this is the hyperbolic sine
-
case class
Sqrt
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the square root of another.
A function which is the square root of another.
When evaluated, the result will be the square root of the result of evaluating the other function.
- z
The function of which this is the square root
-
case class
Subtract
(a: ComplexFunction, b: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which subtracts one function from another.
A function which subtracts one function from another.
When evaluated, the result will be the result of evaluating one function subtracted from the result of evaluating the other.
- a
The minuend
- b
The subtrahend
-
case class
Tan
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the tangent of another.
A function which is the tangent of another.
When evaluated, the result will be the tangent of the result of evaluating the other function.
- z
The function of which this is the tangent
-
case class
Tanh
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the hyperbolic tangent of another.
A function which is the hyperbolic tangent of another.
When evaluated, the result will be the hyperbolic tangent of the result of evaluating the other function.
- z
The function of which this is the hyperbolic tangent
-
case class
UnaryMinus
(z: ComplexFunction) extends ComplexFunction with Product with Serializable
A function which is the negative of another.
A function which is the negative of another.
When evaluated, the result will be the negative of the result of evaluating the other function.
- z
The function to be negated
-
case class
Variable
(variable: String) extends ComplexFunction with Product with Serializable
A variable which, when evaluated, will return its respective function in the variable map.
A variable which, when evaluated, will return its respective function in the variable map.
If, when evaluated, the variable's string representation is not found in the map, it will throw a VariableException.
- variable
The string representation of the variable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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( ... )
-
def
differentiate(function: ComplexFunction)(implicit respect: String = "x"): ComplexFunction
Differentiates this function with respect to a given variable.
Differentiates this function with respect to a given variable.
This returns a new function which is the derivative of the input.
The functions
Conj
,Abs
,Arg
,Im
andRe
are not differentiable. If they are part of the function, then, on evaluating the derivative, the function will only output NaN.- function
The function to differentiate
- respect
The variable to differentiate with respect to,
x
by default- returns
The derivative of the function
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
evaluableBy(function: ComplexFunction)(implicit vars: Array[String]): Boolean
Determines whether the given function contains only the provided variables, and not any other.
Determines whether the given 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, as long as it does 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.
- function
A
ComplexFunction
- vars
An array of strings containing the allowed variables
- returns
true
if the function does not contain any variables other than those provided
-
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
-
def
simplify(function: ComplexFunction): ComplexFunction
Simplifies the input function.
Simplifies the input function.
The new function will be equivalent, producing the same output for the same inputs. However, it will be simpler, eliminating redundant calculations such as multiplications by 1, or the sine of the inverse sine. After simplifying a function, evaluating it will likely be faster.
- function
The function to simplify
- returns
The simplified function
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
implicit
def
toConstant(v: Int): Constant
Implicitly wraps the input as a Constant.
-
implicit
def
toConstant(v: Double): Constant
Implicitly wraps the input as a Constant.
-
implicit
def
toConstant(v: Complex): Constant
Implicitly wraps the input as a Constant.
Implicitly wraps the input as a Constant.
- v
The input to be converted to a
Constant
.- returns
A
Constant
which, when evaluated, will return the input.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )
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.