Aggregate

com.phasmidsoftware.number.expression.expr.Aggregate
See theAggregate companion class
object Aggregate

Companion object for the Aggregate class.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Aggregate.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def create(function: ExpressionBiFunction, xs: Seq[Expression]): Aggregate

Creates an instance of Aggregate using the given binary function and sequence of expressions. Throws an IllegalArgumentException if the sequence of expressions is empty.

Creates an instance of Aggregate using the given binary function and sequence of expressions. Throws an IllegalArgumentException if the sequence of expressions is empty.

Value parameters

function

the binary function used to compose the Aggregate.

xs

a sequence of Expression objects to be aggregated.

Attributes

Returns

an Aggregate instance composed of the binary function and the sequence of expressions.

Note

Throws java.lang.IllegalArgumentException if the sequence of expressions is empty.

Creates an empty Aggregate instance using the provided binary function. The resulting Aggregate will have an empty sequence of expressions.

Creates an empty Aggregate instance using the provided binary function. The resulting Aggregate will have an empty sequence of expressions.

Value parameters

function

the binary function used to compose the Aggregate.

Attributes

Returns

an empty Aggregate instance.

def getAnglesEtc(xs: Seq[Expression]): Seq[Expression]

Processes a sequence of expressions and separates them into angles, reciprocal angles, and other non-angle expressions. The method applies specific transformations to recognize angles and reciprocal angles, and combines the results into a single sequence.

Processes a sequence of expressions and separates them into angles, reciprocal angles, and other non-angle expressions. The method applies specific transformations to recognize angles and reciprocal angles, and combines the results into a single sequence.

Value parameters

xs

the sequence of expressions (Seq[Expression]) to be analyzed and processed. The expressions may include angles, reciprocal angles, or other types.

Attributes

Returns

a sequence of processed expressions, including angles, reciprocal angles, and other non-angle expressions.

def hasAngles(xs: Seq[Expression]): Boolean

Determines whether the given sequence of expressions contains at least one expression that represents an angle.

Determines whether the given sequence of expressions contains at least one expression that represents an angle.

Value parameters

xs

the sequence of Expression objects to analyze. Each Expression may represent an angle or another type of mathematical expression.

Attributes

Returns

true if the sequence contains at least one expression that represents an angle, otherwise false.

def hasReciprocalAngles(xs: Seq[Expression]): Boolean

Determines whether the given sequence of expressions contains at least one expression that represents a reciprocal angle.

Determines whether the given sequence of expressions contains at least one expression that represents a reciprocal angle.

Value parameters

xs

the sequence of Expression objects to analyze. Each Expression may represent an angle, a reciprocal angle, or another type of mathematical expression.

Attributes

Returns

true if the sequence contains a reciprocal angle, otherwise false.

Constructs an Aggregate expression that applies the Product operation to a variable number of input expressions.

Constructs an Aggregate expression that applies the Product operation to a variable number of input expressions.

Value parameters

xs

a sequence of Expression instances that will be aggregated by the Product operation.

Attributes

Returns

an Expression representing the product of the input expressions.

Constructs an Aggregate expression that applies the Sum operation to a variable number of input expressions.

Constructs an Aggregate expression that applies the Sum operation to a variable number of input expressions.

Value parameters

xs

a sequence of Expression instances that will be aggregated by the Sum operation.

Attributes

Returns

an Expression representing the sum of the input expressions.