com.phasmidsoftware.number.top
Members list
Type members
Classlikes
A trait representing a generic attribute with an integer mapping.
A trait representing a generic attribute with an integer mapping.
Implementations of this trait are expected to provide a concrete definition of the toInt method, which maps the attribute to a corresponding integer value. This may be used for comparison, serialization, or other domain-specific purposes.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Represents a card with specific attributes.
Represents a card with specific attributes.
Value parameters
- color
-
The color attribute of the card, represented as an integer. There are three colors: red (1), green (2), and purple (3).
- number
-
The number attribute of the card, represented as an integer from 1 to 3.
- shading
-
The shading attribute of the card, represented as an integer. There are three shadings: solid (1), striped (2), and open (3).
- shape
-
The shape attribute of the card, represented as an integer. There are three shapes: diamond (1), oval (2), and squiggle (3).
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalstrait Attributeclass Objecttrait Matchableclass AnyShow all
A sealed trait representing natural numbers (non-negative integers). Natural numbers are either Zero or a Successor of another natural number. This trait provides methods for basic arithmetic operations including addition, subtraction, and multiplication.
A sealed trait representing natural numbers (non-negative integers). Natural numbers are either Zero or a Successor of another natural number. This trait provides methods for basic arithmetic operations including addition, subtraction, and multiplication.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalstrait Attributeclass Objecttrait Matchableclass AnyShow all
The PhysicalConstants object serves as a collection of fundamental physical constants, including both exact (defined by the SI system) and measured values (with uncertainties). Each constant is encapsulated as a Quantity with its respective dimension and unit.
The PhysicalConstants object serves as a collection of fundamental physical constants, including both exact (defined by the SI system) and measured values (with uncertainties). Each constant is encapsulated as a Quantity with its respective dimension and unit.
These constants are essential for a wide range of scientific and engineering calculations in disciplines such as electromagnetism, thermodynamics, quantum mechanics, and relativity.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PhysicalConstants.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Represents a measurable quantity defined by a numerical value and a physical unit. The type parameter D specifies the dimension of the quantity.
Represents a measurable quantity defined by a numerical value and a physical unit. The type parameter D specifies the dimension of the quantity.
This case class is useful for performing unit-aware numerical operations and rendering quantities in a human-readable format.
Value parameters
- unit
-
the physical unit associated with the quantity, specified as a
PhysicalUnit[D] - value
-
the numerical value of the quantity, which is represented as a
Valuable
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Renderableclass Objecttrait Matchableclass AnyShow all
Provides factory methods for creating instances of the Quantity class.
Provides factory methods for creating instances of the Quantity class.
Quantities represent measurable values associated with physical units and are parameterized by their dimension type D, which defines the specific physical property of the quantity (e.G., length, time, etc.).
The companion object offers multiple overloaded apply methods for constructing quantities using different types of numerical input.
Attributes
Represents an exception specific to quantity-related errors.
Represents an exception specific to quantity-related errors.
The QuantityException is used to signal issues or invalid operations related to quantities within the application. It extends the base Exception class and includes a customizable error message to provide additional context about the exception's cause.
Value parameters
- message
-
Detailed message describing the nature of the quantity-related error.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
An object that provides utilities for parsing textual representations of quantities. A quantity is composed of a numerical value, optionally followed by a physical unit.
An object that provides utilities for parsing textual representations of quantities. A quantity is composed of a numerical value, optionally followed by a physical unit.
Attributes
- Supertypes
- Self type
-
QuantityParser.type
The RomanParser class provides functionality for parsing Roman numerals and converting them into their respective natural number representations using the Natural type system.
The RomanParser class provides functionality for parsing Roman numerals and converting them into their respective natural number representations using the Natural type system.
The class uses combinator parsers to validate and parse the Roman numeral strings. Supported Roman numeral characters are M, D, C, L, X, V, and I. The parser respects the rules of Roman numeral construction, including subtractive combinations like IV and IX.
Attributes
- Supertypes
-
trait JavaTokenParserstrait RegexParserstrait Parsersclass Objecttrait Matchableclass AnyShow all
Represents a set of three cards in the game of Set. A valid Set consists of exactly three cards, where for each attribute (shape, color, number, and shading), the values must either all be the same or all be different across the three cards.
Represents a set of three cards in the game of Set. A valid Set consists of exactly three cards, where for each attribute (shape, color, number, and shading), the values must either all be the same or all be different across the three cards.
Value parameters
- cards
-
The sequence of three
Cardobjects that make up the set.
Attributes
- Constructor
-
Creates a
Setwith a specified sequence of three cards. Ensures the sequence contains exactly three cards. - Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Represents the game logic for the card game "Set". See https://en.wikipedia.org/wiki/Set_(card_game).
Represents the game logic for the card game "Set". See https://en.wikipedia.org/wiki/Set_(card_game).
The SetGame class encapsulates functionality for managing and executing the rules and behavior of the game. The game involves identifying sets of three cards from a collection that satisfy specific matching conditions.
This class may include operations such as dealing cards, validating sets, and tracking the state of the game. It is designed to support the core mechanics of the "Set" game.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalstrait Attributeclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalstrait Attributeclass Objecttrait Matchableclass AnyShow all
Represents the successor of a natural number in the Peano arithmetic system.
Represents the successor of a natural number in the Peano arithmetic system.
A Successor object encapsulates a natural number, providing various operations for arithmetic and representation. It extends the Natural trait and defines the following functionalities:
next: Returns the next natural number by creating a newSuccessorobject.add: Recursively adds another natural number to this natural number.toString: Returns a Roman numeral representation of the natural number.
Value parameters
- natural
-
A natural number representing the predecessor of this number.
Attributes
- Constructor
-
Creates a
Successorobject with the given natural number. - Supertypes
-
trait Serializabletrait Producttrait Equalstrait Naturalclass Objecttrait Matchableclass AnyShow all
Zero represents the natural number zero in the Peano arithmetic system.
Zero represents the natural number zero in the Peano arithmetic system.
It is the base case of the natural numbers and does not have a predecessor. The Zero object extends the Natural trait and provides implementations for its methods.
next: Returns the successor of zero, which is the natural number one.add: Returns the input natural number as the result of adding zero to it.toString: Overrides the string representation to an empty string.
Attributes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Aggregator object providing convenient imports for working with Expressions.
Aggregator object providing convenient imports for working with Expressions.
Usage:
import expr._
val result = ∅ + 1 + 2 * 3
val expr = math"x^2 + 3x - 5"
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
expr.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any