Structure

com.phasmidsoftware.number.algebra.eager.Structure
See theStructure companion trait
object Structure

The Structure object serves as a companion object for the Structure class, providing common operations, typeclass instances, and supplementary functionality.

Key responsibilities of this object include:

  • Defining typeclass instances for equality (Eq) and fuzzy equality (FuzzyEq) for Structure types.
  • Implementing a DyadicOperator instance that provides a mechanism for combining two Structure objects, supporting both same-type and cross-type operations.
  • Logging and error handling during certain cross-type comparisons.

The Structure class represents a hierarchy of mathematical structures, including scalars, functional values, and other specific instances, and this companion object facilitates their interoperation.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Structure.type

Members list

Value members

Concrete methods

def asT[T <: Structure : ClassTag](x: Structure): T

Attempts to cast the provided Structure instance to the specified subtype T. Throws an AlgebraException if the provided instance cannot be cast to the target type.

Attempts to cast the provided Structure instance to the specified subtype T. Throws an AlgebraException if the provided instance cannot be cast to the target type.

Type parameters

T

the target subtype of Structure to which the input instance will be cast.

Value parameters

x

the input instance of Structure to be cast to the desired type T.

Attributes

Returns

the input instance cast to the type T if the cast is valid and successful.

Note

Throws com.phasmidsoftware.number.algebra.util.AlgebraException if the input instance cannot be cast to the type T.

Implicits

Implicits

LatexRenderer for Structure (general case).

LatexRenderer for Structure (general case).

Attempts to render based on the concrete type.

Attributes