com.phasmidsoftware.number.core.mill

Members list

Type members

Classlikes

case object Add extends Dyadic

Add operator (sub-type of Dyadic).

Add operator (sub-type of Dyadic).

Attributes

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

CHS (change sign) operator (sub-type of Monadic).

CHS (change sign) operator (sub-type of Monadic).

Attributes

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

Close (close parenthesis) operator (sub-type of Item).

Close (close parenthesis) operator (sub-type of Item).

Attributes

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

Clr (clear) operator (sub-type of Item).

Clr (clear) operator (sub-type of Item).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait CoreMillItem
class Object
trait Matchable
class Any
Show all
Self type
Clr.type
object CoreMill

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
CoreMill.type
trait CoreMill extends Iterable[CoreMillItem]

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[CoreMillItem]
trait IterableFactoryDefaults[CoreMillItem, Iterable]
trait IterableOps[CoreMillItem, Iterable, Iterable[CoreMillItem]]
trait IterableOnceOps[CoreMillItem, Iterable, Iterable[CoreMillItem]]
trait IterableOnce[CoreMillItem]
class Object
trait Matchable
class Any
Show all
Known subtypes
object Empty
class Stack
Self type

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

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
object CoreMillItem

Companion object to Item.

Companion object to Item.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait CoreMillItem

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
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
case object Cos extends Monadic

Cos (cosine) operator (sub-type of Monadic).

Cos (cosine) operator (sub-type of Monadic).

Attributes

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

Divide operator (sub-type of Dyadic).

Divide operator (sub-type of Dyadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Dyadic
trait CoreMillItem
class Object
trait Matchable
class Any
Show all
Self type
Divide.type
class Dyadic(val precedence: Int, val leftAssociativity: Boolean = ...) extends CoreMillItem

Sub-class of Item which represents a dyadic operator.

Sub-class 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 CoreMillItem
class Object
trait Matchable
class Any
Known subtypes
object Add
object Divide
object Multiply
object Power
object Subtract
object Dyadic

Companion object to Dyadic.

Companion object to Dyadic.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Dyadic.type
case class DyadicExpression(left: CoreMillExpression, right: CoreMillExpression, operator: String) extends CoreMillExpression

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
class Object
trait Matchable
class Any
Show all
case object Empty extends CoreMill

Empty Mill definition.

Empty Mill definition.

Attributes

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

Exponent (e^x) operator (sub-type of Monadic).

Exponent (e^x) operator (sub-type of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait CoreMillItem
class Object
trait Matchable
class Any
Show all
Self type
Exponent.type
case class Expr(x: CoreMillExpression) extends CoreMillItem

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

Expr (expression) operator (sub-type 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 CoreMillItem
class Object
trait Matchable
class Any
Show all
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 object Inv extends Monadic

Inv (invert) operator (sub-type of Monadic).

Inv (invert) operator (sub-type of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait CoreMillItem
class Object
trait Matchable
class Any
Show all
Self type
Inv.type
case object Ln extends Monadic

Ln (natural logarithm) operator (sub-type of Monadic).

Ln (natural logarithm) operator (sub-type of Monadic).

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Monadic
trait CoreMillItem
class Object
trait Matchable
class Any
Show all
Self type
Ln.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 CoreMillItem

Sub-trait of Item to define a Monadic operator.

Sub-trait of Item to define a Monadic operator.

Attributes

Supertypes
trait CoreMillItem
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: CoreMillExpression, str: String) extends CoreMillExpression

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
class Object
trait Matchable
class Any
Show all
case object Multiply extends Dyadic

Multiply operator (sub-type of Dyadic).

Multiply operator (sub-type of Dyadic).

Attributes

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

Noop (no-op) operator (sub-type of Item).

Noop (no-op) operator (sub-type of Item).

Attributes

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

Open (open parenthesis) operator (sub-type of Item).

Open (open parenthesis) operator (sub-type of Item).

Attributes

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

Power operator (sub-type of Dyadic).

Power operator (sub-type of Dyadic).

Attributes

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

Sin (sine) operator (sub-type of Monadic).

Sin (sine) operator (sub-type of Monadic).

Attributes

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

Sqrt (square root) operator (sub-type of Monadic).

Sqrt (square root) operator (sub-type of Monadic).

Attributes

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

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 CoreMill
trait Iterable[CoreMillItem]
trait IterableFactoryDefaults[CoreMillItem, Iterable]
trait IterableOps[CoreMillItem, Iterable, Iterable[CoreMillItem]]
trait IterableOnceOps[CoreMillItem, Iterable, Iterable[CoreMillItem]]
trait IterableOnce[CoreMillItem]
class Object
trait Matchable
class Any
Show all
case object Subtract extends Dyadic

Subtract operator (sub-type of Dyadic).

Subtract operator (sub-type of Dyadic).

Attributes

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

Swap operator (sub-type of Item).

Swap operator (sub-type of Item).

Attributes

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

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
class Object
trait Matchable
class Any
Show all