intervalidus
Intervalidus is a Scala library with zero dependencies for representing data as valid only in discrete or continuous multidimensional intervals (tests cover up to four-dimensional data). It answers the question "In what intervals are your data valid?"
This top-level package includes Intervalidus's main traits, classes, and other members:
- Type classes for common discrete and continuous domain values.
- Foundational case classes, type classes, and enums for multidimensional domains, intervals, diff actions, and valid data.
- Base traits for dimensional data, including versioned and multivalued data.
Attributes
Members list
Packages
Intervalidus's custom data structures for optimizing multidimensional interval retrieval. These were built for internal use, but use them if they are useful. There are both immutable and mutable versions of each data structure, but only the mutable versions are used internally (for performance reasons).
Intervalidus's custom data structures for optimizing multidimensional interval retrieval. These were built for internal use, but use them if they are useful. There are both immutable and mutable versions of each data structure, but only the mutable versions are used internally (for performance reasons).
- Box search trees manage boxed data structures in multidimensional double space (hyperoctrees of any dimension). They hold boxes rather than individual points, where boxes are split to fit into the subtrees (the hyperoctants) of the data structure. Intervalidus uses the ordered hashes defined on the domain value components of intervals to approximate all intervals as boxes in double space, and manages valid data associated with these boxes in box search trees, resulting in dramatically faster intersection retrieval (in most cases).
- Multimaps (a.k.a., multi-dictionaries) allow multiple values to be associated with the same key. Intervalidus uses multimaps to store the association of each valid value with all the intervals where it is valid. This allows value-driven functions like compression to operate on a smaller subset of valid values and to be substantially faster.
Attributes
Intervalidus's main traits and classes for defining immutable dimensional data, including versioned and multivalued data:
Intervalidus's main traits and classes for defining immutable dimensional data, including versioned and multivalued data:
- Base trait for all immutable dimensional data.
- Classes defining immutable data in multidimensional intervals.
Attributes
Supports example Intervalidus sample JSON pickling subprojects, which could be useful when managing Intervalidus data in a JSON data store (e.g., MongoDB) and/or serializing data through web services.
Supports example Intervalidus sample JSON pickling subprojects, which could be useful when managing Intervalidus data in a JSON data store (e.g., MongoDB) and/or serializing data through web services.
Attributes
Intervalidus's main traits and classes for defining mutable dimensional data, including versioned and multivalued data:
Intervalidus's main traits and classes for defining mutable dimensional data, including versioned and multivalued data:
- Base trait for all mutable dimensional data.
- Classes defining mutable data in multidimensional intervals.
Attributes
A toy rules engine which is not strictly related to Intervalidus, but it is used in an example rules-based application that shows how Intervalidus structures can be used to capture the outcomes of patients in a clinical trial. The toy rules engine is used to interpret daily measurements, and Intervalidus to capture progress concisely. It uses some interesting generic and metaprogramming features of Scala 3 to represent and process facts.
A toy rules engine which is not strictly related to Intervalidus, but it is used in an example rules-based application that shows how Intervalidus structures can be used to capture the outcomes of patients in a clinical trial. The toy rules engine is used to interpret daily measurements, and Intervalidus to capture progress concisely. It uses some interesting generic and metaprogramming features of Scala 3 to represent and process facts.
Attributes
Type members
Classlikes
Type class for continuous values, which are:
Type class for continuous values, which are:
- bounded, with both a lower bound (minValue) and an upper bound (maxValue)
- totally ordered (extends Ordering, requiring a compare method)
- mappable to a weakly monotonic double value (requires an orderedHashOf method that may have "collisions")
Unlike a DiscreteValue, a continuous value is not necessarily well-ordered. That is, there is no requirement for having predecessors and successors defined. Although one can say that every digitized data structure is, by its very nature, discrete, it is often easier to reason about some data types when treated as continuous. For example, integer values and local dates are good candidates for being treated as discrete where double-precision float values and local date-times are often better treated as continuous.
See https://en.wikipedia.org/wiki/Bounded_set, https://en.wikipedia.org/wiki/Maximum_and_minimum, https://en.wikipedia.org/wiki/Total_order, https://en.wikipedia.org/wiki/Monotonic_function, and https://en.wikipedia.org/wiki/Well-order.
Type parameters
- T
-
a type with continuous value behavior (e.g.,
Double)
Attributes
- Companion
- object
- Source
- ContinuousValue.scala
- Supertypes
-
trait DomainValueLike[T]trait Ordering[T]trait PartialOrdering[T]trait Equiv[T]trait Serializabletrait Comparator[T]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object DoubleContinuousValueobject InstantContinuousValueobject IntContinuousValueobject LocalDateContinuousValueobject LocalDateTimeContinuousValueobject LongContinuousValueShow all
Default continuous value type classes for common data types.
Default continuous value type classes for common data types.
Attributes
- Companion
- trait
- Source
- ContinuousValue.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ContinuousValue.type
Type class for getting the current datetime.
Type class for getting the current datetime.
Attributes
- Companion
- object
- Source
- CurrentDateTime.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object given_CurrentDateTime
For getting the actual (default) or a simulated current datetime.
For getting the actual (default) or a simulated current datetime.
Attributes
- Companion
- trait
- Source
- CurrentDateTime.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CurrentDateTime.type
Type class for getting the current instant.
Type class for getting the current instant.
Attributes
- Companion
- object
- Source
- CurrentInstant.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object given_CurrentInstant
For getting the actual (default) or a simulated current instant.
For getting the actual (default) or a simulated current instant.
Attributes
- Companion
- trait
- Source
- CurrentInstant.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
CurrentInstant.type
Create/update/delete actions (like CQRS mutation commands). Used when extrapolating or applying event source-style information on dimensional data.
Create/update/delete actions (like CQRS mutation commands). Used when extrapolating or applying event source-style information on dimensional data.
Type parameters
- D
-
for
CreateandUpdate, the type of domain used in the interval assigned to the valid value, and forDelete, the type of domain used as the key. - V
-
the type of the value managed as data (not used in
Delete).
Attributes
- Note
-
intervalidus does not have event-sourced data structures, and the history of mutations is not maintained.
- Companion
- object
- Source
- DiffAction.scala
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Common definitions for the create/update/delete actions on dimensional data.
Common definitions for the create/update/delete actions on dimensional data.
Attributes
- Companion
- enum
- Source
- DiffAction.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DiffAction.type
Common definitions used in all dimensional data.
Common definitions used in all dimensional data.
Attributes
- Companion
- trait
- Source
- DimensionalBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DimensionalBase.type
Base for all dimensional data, both mutable and immutable, of multiple dimensions.
Base for all dimensional data, both mutable and immutable, of multiple dimensions.
Type parameters
- D
-
the domain type -- a non-empty tuple that is DomainLike.
- V
-
the type of the value managed as data.
Attributes
- Companion
- object
- Source
- DimensionalBase.scala
- Supertypes
-
trait PartialFunction[D, V]trait D => Vclass Objecttrait Matchableclass Any
- Known subtypes
-
Show all
Parameters for constructing data in multidimensional intervals.
Parameters for constructing data in multidimensional intervals.
Attributes
- Source
- DimensionalBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object Dataobject Dataobject DataMonoidobject DataMonoidobject DataMultiobject DataMultiShow all
Constructs data in multidimensional intervals.
Constructs data in multidimensional intervals.
Attributes
- Source
- DimensionalBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Base for all dimensional data, both mutable and immutable, where values can be combined as monoids.
Base for all dimensional data, both mutable and immutable, where values can be combined as monoids.
Type parameters
- D
-
the domain type -- a non-empty tuple that is DomainLike.
- V
-
the type of the value managed as data -- must be a Monoid (can be combined and has an identity).
Attributes
- Source
- DimensionalMonoidBase.scala
- Supertypes
-
trait PartialFunction[D, V]trait D => Vclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
Constructs dimensional data where values can be combined as monoids.
Constructs dimensional data where values can be combined as monoids.
Attributes
- Source
- DimensionalMonoidBase.scala
- Supertypes
- Known subtypes
-
object DataMonoidobject DataMonoid
Common definitions used in all dimensional multivalued data.
Common definitions used in all dimensional multivalued data.
Attributes
- Companion
- trait
- Source
- DimensionalMultiBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DimensionalMultiBase.type
Data that may have multiple values (managed as sets of values) in different intervals.
Data that may have multiple values (managed as sets of values) in different intervals.
Type parameters
- D
-
the domain type -- a non-empty tuple that is DomainLike.
- V
-
the type of the value managed as data.
Attributes
- Companion
- object
- Source
- DimensionalMultiBase.scala
- Supertypes
-
trait PartialFunction[D, Set[V]]trait D => Set[V]class Objecttrait Matchableclass AnyShow all
- Known subtypes
Constructs multivalued data in multidimensional intervals.
Constructs multivalued data in multidimensional intervals.
Attributes
- Source
- DimensionalMultiBase.scala
- Supertypes
- Known subtypes
Common definitions used in all versioned dimensional data (with a hidden version dimension).
Common definitions used in all versioned dimensional data (with a hidden version dimension).
Attributes
- Companion
- trait
- Source
- DimensionalVersionedBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Interface is similar to DimensionalBase, but it operates on an underlying intervalidus.mutable.Data using an extra integer-valued head dimension to version data. One use case would be versioned data that are valid in two dimensions of time, so the underlying data actually vary in terms of version and two dimensions of time (three dimensions). Most methods require some generic version selection criteria rather than specific integer intervals, therefore this does not extend DimensionalBase.
Interface is similar to DimensionalBase, but it operates on an underlying intervalidus.mutable.Data using an extra integer-valued head dimension to version data. One use case would be versioned data that are valid in two dimensions of time, so the underlying data actually vary in terms of version and two dimensions of time (three dimensions). Most methods require some generic version selection criteria rather than specific integer intervals, therefore this does not extend DimensionalBase.
The "current" version is managed as state (a var). Versioning also separates notions of approved vs. unapproved data (unapproved data are pushed up to start at version maxValue). When getting data, by default, we return "current" version data (a.k.a., approved). When updating data, by default, we don't rewrite history, so mutations start with the "current" version too.
Type parameters
- D
-
the domain type -- a non-empty tuple that is DomainLike.
- V
-
the type of the value managed as data.
Attributes
- Note
-
Updates starting with "current" also update unapproved changes (since intervalFrom goes to the Top).
- Companion
- object
- Source
- DimensionalVersionedBase.scala
- Supertypes
- Known subtypes
-
Constructs data in multidimensional intervals that are also versioned (hidden extra dimension).
Constructs data in multidimensional intervals that are also versioned (hidden extra dimension).
Attributes
- Source
- DimensionalVersionedBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object DataVersionedobject DataVersioned
Type class for discrete values, which are:
Type class for discrete values, which are:
- bounded, with both a lower bound (minValue) and an upper bound (maxValue)
- totally ordered (extends Ordering, requiring a compare method)
- mappable to a weakly monotonic double value (requires an orderedHashOf method that may have "collisions")
- well ordered, having both a predecessorOf and successorOf function (unlike a ContinuousValue).
The predecessor must only be defined for values strictly greater than minValue and the successor only for values strictly less than maxValue. Having the predecessor and successor definitions limited in this way avoids issues where related methods of the underlying data types behave unexpectedly/inconsistently on the boundaries. For example, Int.MaxValue + 1 and Int.MinValue - 1 silently wrap around to each other, whereas both LocalDate.MAX.plusDays(1) and LocalDate.MIN.minusDays(1) throw a DateTimeException.
See https://en.wikipedia.org/wiki/Bounded_set, https://en.wikipedia.org/wiki/Maximum_and_minimum, https://en.wikipedia.org/wiki/Total_order, https://en.wikipedia.org/wiki/Monotonic_function, and https://en.wikipedia.org/wiki/Well-order.
Type parameters
- T
-
a type with discrete value behavior (e.g.,
Int)
Attributes
- Companion
- object
- Source
- DiscreteValue.scala
- Supertypes
-
trait DomainValueLike[T]trait Ordering[T]trait PartialOrdering[T]trait Equiv[T]trait Serializabletrait Comparator[T]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
object BigIntegerDiscreteValueobject IntDiscreteValueobject LocalDateDiscreteValueobject LongDiscreteValueobject InstantDiscreteValue
Default discrete value type classes for common data types.
Default discrete value type classes for common data types.
Attributes
- Companion
- trait
- Source
- DiscreteValue.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DiscreteValue.type
Common definitions for multidimensional domains.
Common definitions for multidimensional domains.
Attributes
- Source
- Domain.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Domain.type
A one-dimensional domain based on an underlying domain value type. One-dimensional domains are used to define the boundaries of one-dimensional intervals, and tuples of one-dimensional domains are used to define the boundaries of multidimensional intervals. It describes specific data points in the domain value range as well as the special Bottom and Top cases which conceptually lie below and above this finite range of data points (logically below and above minValue and maxValue respectively). Domains can be based on domain values that are discrete or continuous. When continuous, a boundary point can either be open or closed, where discrete points must always be closed.
A one-dimensional domain based on an underlying domain value type. One-dimensional domains are used to define the boundaries of one-dimensional intervals, and tuples of one-dimensional domains are used to define the boundaries of multidimensional intervals. It describes specific data points in the domain value range as well as the special Bottom and Top cases which conceptually lie below and above this finite range of data points (logically below and above minValue and maxValue respectively). Domains can be based on domain values that are discrete or continuous. When continuous, a boundary point can either be open or closed, where discrete points must always be closed.
This also gives a way to completely describe adjacency.
- When domain values are discrete, the left and right adjacent domains of a point are the respective predecessors and successors of the domain value. This also gives us a way to accommodate having predecessors/successors on the boundaries, i.e.,
domain(maxValue).rightAdjacent == Topanddomain(minValue).leftAdjacent == Bottom. - When domain values are continuous, the left and right adjacent domains are always the same: open if the point is closed and closed if the point is open.
- In both discrete and continuous domains,
TopandBottomare considered self-adjacent.
Type parameters
- D
-
expected to be a domain value (i.e.,
DomainValueLike[D]should be given).
Attributes
- Companion
- object
- Source
- Domain1D.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Common definitions for the one-dimensional domains.
Common definitions for the one-dimensional domains.
Attributes
- Companion
- trait
- Source
- Domain1D.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Domain1D.type
Type class with operations on a domain with multiple discrete and/or continuous dimensions.
Type class with operations on a domain with multiple discrete and/or continuous dimensions.
An n-dimensional domain is represented by a tuple of Domain1D[Ti] values (where 'i' varies from 1 to n), and each Ti is a (potentially different) domain value type that is DomainValueLike.
An n-dimensional domain is used in defining the boundaries of an n-dimensional interval. Generally, you will not need to use these methods directly -- they are here primarily to support methods on Interval and ValidData.
Type parameters
- D
-
the domain type -- a non-empty tuple of one-dimensional domains, where each can have its own domain value type.
Attributes
- Companion
- object
- Source
- DomainLike.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Common definitions for multidimensional domain type classes.
Common definitions for multidimensional domain type classes.
Attributes
- Companion
- class
- Source
- DomainLike.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DomainLike.type
Internal type class for operating on multidimensional domains and related structures.
Internal type class for operating on multidimensional domains and related structures.
An n-dimensional domain is represented by a tuple of Domain1D[Ti] values (where i varies from 1 to n), and each Ti is a (potentially different) domain value type that is DomainValueLike.
This makes extensive use of Scala 3's generic programming techniques on tuples (for more information, see https://www.scala-lang.org/2021/02/26/tuples-bring-generic-programming-to-scala-3.html). These operations are meant to support DomainLike type classes and should not need to be called directly.
Type parameters
- D
-
Tuple of domain one-dimensional domains of various domain value types
Attributes
- Companion
- object
- Source
- DomainLikeTupleOps.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Use recursive decomposition of tuples to provide domain-like capabilities to tuples.
Use recursive decomposition of tuples to provide domain-like capabilities to tuples.
Attributes
- Companion
- trait
- Source
- DomainLikeTupleOps.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
DomainLikeTupleOps.type
A domain value is at least
A domain value is at least
- bounded, with both a lower bound (minValue) and an upper bound (maxValue)
- totally ordered (extends Ordering, requiring a compare method)
- mappable to a weakly monotonic double value (requires an orderedHashOf method that may have "collisions")
See https://en.wikipedia.org/wiki/Bounded_set, https://en.wikipedia.org/wiki/Maximum_and_minimum, https://en.wikipedia.org/wiki/Total_order, and https://en.wikipedia.org/wiki/Monotonic_function.
Type parameters
- T
-
a type with continuous or discrete value behavior (e.g.,
Double)
Attributes
- Source
- DomainValueLike.scala
- Supertypes
-
trait Ordering[T]trait PartialOrdering[T]trait Equiv[T]trait Serializabletrait Comparator[T]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait ContinuousValue[T]object DoubleContinuousValueobject InstantContinuousValueobject IntContinuousValueobject LocalDateContinuousValueobject LocalDateTimeContinuousValueobject LongContinuousValuetrait DiscreteValue[T]object BigIntegerDiscreteValueobject IntDiscreteValueobject LocalDateDiscreteValueobject LongDiscreteValueobject InstantDiscreteValueShow all
Gets the values field from an enum (i.e., from the companion of the sealed trait) to retrieve all enums values.
Gets the values field from an enum (i.e., from the companion of the sealed trait) to retrieve all enums values.
Attributes
- Source
- EnumMacro.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
EnumMacro.type
Constructs experimental feature configurations.
Constructs experimental feature configurations.
Attributes
- Source
- Experimental.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Experimental.type
An interval in multiple dimensions over a contiguous domain D. See https://en.wikipedia.org/wiki/Interval_(mathematics) for more information.
An interval in multiple dimensions over a contiguous domain D. See https://en.wikipedia.org/wiki/Interval_(mathematics) for more information.
This class is verified against the Laws of Set Theory. See the laws project in the source for the full test suite.
Type parameters
- D
-
the domain type -- a non-empty tuple that is DomainLike.
Value parameters
- end
-
the "supremum", i.e., the right boundary of the interval -- must be greater than or equal to the start in all dimensions (where "right" is used in a general sense: could be right and/or above and/or front, etc., depending on dimensions and context)
- start
-
the "infimum", i.e., the left boundary of the interval (where "left" is used in a general sense: could be left and/or below and/or back, etc., depending on dimensions and context)
Attributes
- Companion
- object
- Source
- Interval.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Common definitions for the multidimensional intervals.
Common definitions for the multidimensional intervals.
Attributes
- Companion
- class
- Source
- Interval.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Interval.type
A one-dimensional interval over a contiguous set of domain values in T. See https://en.wikipedia.org/wiki/Interval_(mathematics) for more information.
A one-dimensional interval over a contiguous set of domain values in T. See https://en.wikipedia.org/wiki/Interval_(mathematics) for more information.
Type parameters
- T
-
a domain value type for this interval's domain (e.g., Int, LocalDate) -- boundaries of the interval are defined in terms of
Domain1D[T]given the type classDomainValueLike[T].
Value parameters
- end
-
the "supremum", i.e., the right boundary of the interval -- must be greater than or equal to the start
- start
-
the "infimum", i.e., the left boundary of the interval
Attributes
- Companion
- object
- Source
- Interval1D.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Common definitions for the one-dimensional intervals.
Common definitions for the one-dimensional intervals.
Attributes
- Companion
- class
- Source
- Interval1D.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Interval1D.type
Base for a one-dimensional or multidimensional interval.
Base for a one-dimensional or multidimensional interval.
Type parameters
- MajorD
-
the domain type of the multidimensional image of
MinorD-- a non-empty tuple that is DomainLike. - MinorD
-
the domain type
- Remainder
-
the type returned by excluding
- Self
-
F-bounded self-type
Attributes
- Source
- IntervalBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Interval[D]class Interval1D[T]
- Self type
-
Self
Constructs multidimensional, multi-interval shapes.
Constructs multidimensional, multi-interval shapes.
Attributes
- Companion
- class
- Source
- IntervalShape.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
IntervalShape.type
A mutidimensional shape over some domain, represented by a collection of disjoint interval components. While an Interval represents a single hyper-rectangle, an IntervalShape represents a complex, potentially disjoint region of space, behaving like a first-class geometric entity. (This is structurally similar to, and supported internally by, an immutable.Data structure with a single unit value.)
A mutidimensional shape over some domain, represented by a collection of disjoint interval components. While an Interval represents a single hyper-rectangle, an IntervalShape represents a complex, potentially disjoint region of space, behaving like a first-class geometric entity. (This is structurally similar to, and supported internally by, an immutable.Data structure with a single unit value.)
IntervalShape supports powerful operators with semantics rooted in set theory:
- union (or ∪) combines two shapes into one
- intersection (or ∩) finds the overlapping region of two shapes
- complement (or c) is the inverse of a shape with respect to the universe
- difference (or [[]]) chisels one shape out of another
- symmetricDifference (or △) finds the disjunctive union of two shapes (a.k.a., the exclusive or)
- isEquivalentTo (or ≡) establishes if two shapes are logically identical
- isSubsetOf (or ⊆) establishes if one shape is contained in another
This class is verified against the Laws of Set Theory. See the laws project in the source for the full test suite. The following summarizes the key laws that are proven there:
- Associative -- the grouping of operations does not matter:
(a ∪ (b ∪ c)) ≡ ((a ∪ b) ∪ c)(a ∩ (b ∩ c)) ≡ ((a ∩ b) ∩ c)(a △ (b △ c)) ≡ ((a △ b) △ c)
- Distributive -- intersections distribute over unions and vice versa:
(a ∪ (b ∩ c)) ≡ ((a ∪ b) ∩ (a ∪ c))(a ∩ (b ∪ c)) ≡ ((a ∩ b) ∪ (a ∩ c))(a ∩ (b △ c)) ≡ ((a ∩ b) △ (a ∩ c))
- Commutative -- the order of operations does not matter:
(a ∪ b) ≡ (b ∪ a)(a ∩ b) ≡ (b ∩ a)(a △ b) ≡ (b △ a)
- De Morgan’s -- relates the complement of unions and intersections:
(a ∪ b).c ≡ (a.c ∩ b.c)(a ∩ b).c ≡ (a.c ∪ b.c)
- Absorption -- simplifies specific combinations:
(a ∪ (a ∩ b)) ≡ a(a ∩ (a ∪ b)) ≡ a
- Idempotent -- a set combined with itself is the set itself:
(a ∪ a) ≡ a(a ∩ a) ≡ a
- Nilpotent -- a set combined with itself is ∅ (self-inverse):
(a △ a) ≡≡ ∅(a \ a) ≡≡ ∅
- Identity -- operations where ξ and ∅ are the identity:
(a ∪ ∅) ≡ a(a ∩ ξ) ≡ a(a △ ∅) ≡ a(a \ ∅) ≡ a
- Complement -- operations with a set's complement:
(a ∪ a.c) ≡ ξ(a ∩ a.c) ≡ ∅(a △ a.c) ≡ ξa.c.c ≡ a(involution)
- Domination -- operations where ξ and ∅ dominate:
(a ∪ ξ) ≡ ξ(a ∩ ∅) ≡ ∅(∅ \ a) ≡ ∅
- Consistency Laws -- equivalent definitions based on set algebra:
a.c ≡ (ξ \ a)(b \ a.c) ≡ (a \ b.c)((a \ b) ∪ (b \ a)) ≡ ((a ∪ b) \ (a ∩ b))(a ∪ b) ≡ ((a △ b) ∪ (a ∩ b))(a ∩ b) ⊆ a(a ∩ b) ⊆ ba ⊆ (a ∪ b)b ⊆ (a ∪ b)(a \ b) ⊆ a(b \ a) ⊆ ba ⊆ ξ∅ ⊆ a
Type parameters
- D
-
the domain type -- a non-empty tuple that is DomainLike.
Attributes
- Companion
- object
- Source
- IntervalShape.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Type class for a monoid. A monoid is a semigroup with an identity element. See https://en.wikipedia.org/wiki/Monoid
Type class for a monoid. A monoid is a semigroup with an identity element. See https://en.wikipedia.org/wiki/Monoid
Attributes
- Companion
- object
- Source
- Monoid.scala
- Supertypes
- Known subtypes
-
object given_Monoid_Doubleobject given_Monoid_Intobject given_Monoid_Longobject given_Monoid_Unit
Attributes
- Companion
- trait
- Source
- Monoid.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Monoid.type
Type class for a semigroup. See https://en.wikipedia.org/wiki/Semigroup
Type class for a semigroup. See https://en.wikipedia.org/wiki/Semigroup
Attributes
- Source
- Semigroup.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait Monoid[V]object given_Monoid_Doubleobject given_Monoid_Intobject given_Monoid_Longobject given_Monoid_Unit
A value that is valid in some multidimensional interval. Conceptually, this defines a partial function where all domain elements that are contained in the interval map to the value.
A value that is valid in some multidimensional interval. Conceptually, this defines a partial function where all domain elements that are contained in the interval map to the value.
Type parameters
- D
-
the domain type -- DomainLike non-empty tuples.
- V
-
the type of the value managed as data (the codomain).
Value parameters
- interval
-
the interval in which the value is valid.
- value
-
value that is valid in this interval.
Attributes
- Companion
- object
- Source
- ValidData.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait PartialFunction[D, V]trait D => Vclass Objecttrait Matchableclass AnyShow all
Common definitions for values that are valid in multidimensional intervals.
Common definitions for values that are valid in multidimensional intervals.
Attributes
- Companion
- class
- Source
- ValidData.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ValidData.type
Common definitions for values that vary in time.
Common definitions for values that vary in time.
Attributes
- Companion
- trait
- Source
- VariableBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
VariableBase.type
A value that varies in time.
A value that varies in time.
Type parameters
- T
-
the value type
Attributes
- Companion
- object
- Source
- VariableBase.scala
- Supertypes
- Known subtypes
Base for companions of values that vary in time.
Base for companions of values that vary in time.
Attributes
- Source
- VariableBase.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Types
Enables/disables experimental features.