com.phasmidsoftware.number.expression.mill

Members list

Type members

Classlikes

case object Add extends Dyadic

Add operator (subtype of Dyadic).

Add operator (subtype of Dyadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Dyadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Add.type
trait Anadic extends Item

Sub-trait of Item to define an Anadic operator.

Sub-trait of Item to define an Anadic operator.

Attributes

Supertypes
trait Item
class Object
trait Matchable
class Any
case object Chs extends Monadic

CHS (change sign) operator (subtype of Monadic).

CHS (change sign) operator (subtype of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Chs.type
case object Close extends Item

Close (close parenthesis) operator (subtype of Item).

Close (close parenthesis) operator (subtype of Item).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Close.type
case object Clr extends Item

Clr (clear) operator (subtype of Item).

Clr (clear) operator (subtype of Item).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Clr.type
case object Cos extends Monadic

Cos (cosine) operator (subtype of Monadic).

Cos (cosine) operator (subtype of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Cos.type
case object Divide extends Dyadic

Divide operator (subtype of Dyadic).

Divide operator (subtype of Dyadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Dyadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Divide.type
object Dyadic

Companion object to Dyadic.

Companion object to Dyadic.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Dyadic.type
class Dyadic(val precedence: Int, val leftAssociativity: Boolean = ...) extends Item

Subclass of Item which represents a dyadic operator.

Subclass of Item which represents a dyadic operator.

Value parameters

leftAssociativity

the left-associativity of the operator.

precedence

the precedence level of the operator.

Attributes

Companion
object
Supertypes
trait Item
class Object
trait Matchable
class Any
Known subtypes
object Add
object Divide
object Multiply
object Power
object Subtract
case class DyadicExpression(left: Expression, right: Expression, operator: String) extends Expression

Represents a dyadic (binary) expression consisting of a left operand, a right operand, and an operator connecting them in an infix notation.

Represents a dyadic (binary) expression consisting of a left operand, a right operand, and an operator connecting them in an infix notation.

Value parameters

left

the left-hand side operand of the expression, represented as an Expression.

operator

the operator as a String connecting the left and right operands.

right

the right-hand side operand of the expression, represented as an Expression.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Expression
class Object
trait Matchable
class Any
Show all
case object Empty extends Mill

Empty Mill definition.

Empty Mill definition.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Mill
trait Iterable[Item]
trait IterableFactoryDefaults[Item, Iterable]
trait IterableOps[Item, Iterable, Iterable[Item]]
trait IterableOnceOps[Item, Iterable, Iterable[Item]]
trait IterableOnce[Item]
class Object
trait Matchable
class Any
Show all
Self type
Empty.type
case object Exponent extends Monadic

Exponent (e^x) operator (subtype of Monadic).

Exponent (e^x) operator (subtype of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Exponent.type
object Expr

Companion object to Expr.

Companion object to Expr.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Expr.type
case class Expr(x: Expression) extends Item

Expr (expression) operator (subtype of Item). In old-fashioned terminology, x is the augend for the + operator, and the multiplier for the * operator.

Expr (expression) operator (subtype of Item). In old-fashioned terminology, x is the augend for the + operator, and the multiplier for the * operator.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Item
class Object
trait Matchable
class Any
Show all
object Expression

Represents an Expression in a symbolic mathematical computation system.

Represents an Expression in a symbolic mathematical computation system.

This class provides operations for mathematical and logical manipulations, including arithmetic, trigonometric, and monadic transformations.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Expression.type
trait Expression

Trait representing a mathematical expression, which can be combined or transformed using various operations. This is intended as a fundamental building block for creating complex expressions or performing symbolic computations.

Trait representing a mathematical expression, which can be combined or transformed using various operations. This is intended as a fundamental building block for creating complex expressions or performing symbolic computations.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case object Inv extends Monadic

Inv (invert) operator (subtype of Monadic).

Inv (invert) operator (subtype of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Inv.type
trait Item

Trait to model the behavior of an item that goes into the Mill.

Trait to model the behavior of an item that goes into the Mill.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Anadic
object Close
object Clr
class Dyadic
object Add
object Divide
object Multiply
object Power
object Subtract
class Expr
trait Monadic
object Chs
object Cos
object Exponent
object Inv
object Ln
object Sin
object Sqrt
object Noop
object Open
object Swap
Show all
object Item

Companion object to Item.

Companion object to Item.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Item.type
case object Ln extends Monadic

Ln (natural logarithm) operator (subtype of Monadic).

Ln (natural logarithm) operator (subtype of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Ln.type
trait Mill extends Iterable[Item]

Trait to define the behavior of a "mill."

Trait to define the behavior of a "mill."

CONSIDER rename Stack as ListMill and extract push, pop and isEmpty as Stack[Item].

Attributes

Companion
object
Supertypes
trait Iterable[Item]
trait IterableFactoryDefaults[Item, Iterable]
trait IterableOps[Item, Iterable, Iterable[Item]]
trait IterableOnceOps[Item, Iterable, Iterable[Item]]
trait IterableOnce[Item]
class Object
trait Matchable
class Any
Show all
Known subtypes
object Empty
class Stack
Self type
object Mill

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Mill.type
case class MillException(s: String) extends Exception

Attributes

Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
trait Monadic extends Item

Sub-trait of Item to define a Monadic operator.

Sub-trait of Item to define a Monadic operator.

Attributes

Supertypes
trait Item
class Object
trait Matchable
class Any
Known subtypes
object Chs
object Cos
object Exponent
object Inv
object Ln
object Sin
object Sqrt
Show all
case class MonadicExpression(expression: Expression, str: String) extends Expression

A case class that models a monadic expression, which represents a single-operand operation applied to another Expression.

A case class that models a monadic expression, which represents a single-operand operation applied to another Expression.

Value parameters

expression

the underlying Expression on which the monadic operation is applied.

str

a string representation of the operator.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Expression
class Object
trait Matchable
class Any
Show all
case object Multiply extends Dyadic

Multiply operator (subtype of Dyadic).

Multiply operator (subtype of Dyadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Dyadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Multiply.type
case object Noop extends Item

Noop (no-op) operator (subtype of Item).

Noop (no-op) operator (subtype of Item).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Noop.type
case object Open extends Item

Open (open parenthesis) operator (subtype of Item).

Open (open parenthesis) operator (subtype of Item).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Open.type
case object Power extends Dyadic

Power operator (subtype of Dyadic).

Power operator (subtype of Dyadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Dyadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Power.type
case object Sin extends Monadic

Sin (sine) operator (subtype of Monadic).

Sin (sine) operator (subtype of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Sin.type
case object Sqrt extends Monadic

Sqrt (square root) operator (subtype of Monadic).

Sqrt (square root) operator (subtype of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Sqrt.type
case class Stack(stack: List[Item]) extends Mill

A case class to represent a stack of Items, providing behavior of Mill.

A case class to represent a stack of Items, providing behavior of Mill.

Value parameters

stack

a List[Item] which will represent the stack.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Mill
trait Iterable[Item]
trait IterableFactoryDefaults[Item, Iterable]
trait IterableOps[Item, Iterable, Iterable[Item]]
trait IterableOnceOps[Item, Iterable, Iterable[Item]]
trait IterableOnce[Item]
class Object
trait Matchable
class Any
Show all
case object Subtract extends Dyadic

Subtract operator (subtype of Dyadic).

Subtract operator (subtype of Dyadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Dyadic
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Subtract.type
case object Swap extends Item

Swap operator (subtype of Item).

Swap operator (subtype of Item).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Item
class Object
trait Matchable
class Any
Show all
Self type
Swap.type
case class TerminalExpression(value: Number) extends Expression

Represents a terminal expression in the expression hierarchy.

Represents a terminal expression in the expression hierarchy.

A TerminalExpression is a leaf node in the expression structure, encapsulating a numeric value. It directly stores a value of type com.phasmidsoftware.number.Number.

Value parameters

value

The numeric value encapsulated by this terminal expression.

Attributes

Constructor

Creates a TerminalExpression with the specified numeric value.

Supertypes
trait Serializable
trait Product
trait Equals
trait Expression
class Object
trait Matchable
class Any
Show all