HeapChain
A chain kept in a heap ordered so that the least cell is at the top, with arithmetic deferred: a cell can appear several times, or with a zero total, until the chain is collapsed. Its order and field are Chain's (taken as plain parameters and passed up, so that they are stored once).
Attributes
- Experimental
- true
- Source
- Chain.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Merges the stored entries of every cell and drops the zero ones. Nothing to do by default (see collapseHead).
Merges the stored entries of every cell and drops the zero ones. Nothing to do by default (see collapseHead).
Attributes
- Definition Classes
- Source
- Chain.scala
Merges the stored entries of the least cell, dropping it if they sum to zero. Nothing to do by default, since the default terms merges as it reads; a storage that keeps merged state (the heap) overrides it.
Merges the stored entries of the least cell, dropping it if they sum to zero. Nothing to do by default, since the default terms merges as it reads; a storage that keeps merged state (the heap) overrides it.
Attributes
- Definition Classes
- Source
- Chain.scala
The stored entries: a cell can appear more than once (arithmetic may be deferred), or with a zero total. The one member a storage must implement.
The stored entries: a cell can appear more than once (arithmetic may be deferred), or with a zero total. The one member a storage must implement.
Attributes
- Definition Classes
- Source
- Chain.scala
Attributes
- Definition Classes
- Source
- Chain.scala
The leading term: the least cell and its coefficient, (None, zero) for the zero chain.
The leading term: the least cell and its coefficient, (None, zero) for the zero chain.
Attributes
- Definition Classes
- Source
- Chain.scala
The stored entries without collapsing: arithmetic is deferred, so a cell can appear more than once (a + a as two (a, 1) pairs) or with a zero total. Cheap; use terms for one coefficient per cell.
The stored entries without collapsing: arithmetic is deferred, so a cell can appear more than once (a + a as two (a, 1) pairs) or with a zero total. Cheap; use terms for one coefficient per cell.
Attributes
- Definition Classes
- Source
- Chain.scala
The terms of the chain: each cell with its (nonzero) coefficient, once, in cell order.
The terms of the chain: each cell with its (nonzero) coefficient, once, in cell order.
Attributes
- Definition Classes
- Source
- Chain.scala
Inherited methods
The order the chain is kept in: its leading term is the least cell under it.
The order the chain is kept in: its leading term is the least cell under it.
Attributes
- Inherited from:
- Chain
- Source
- Chain.scala
The cells with a nonzero coefficient, in cell order.
The cells with a nonzero coefficient, in cell order.
Attributes
- Inherited from:
- Chain
- Source
- Chain.scala
The field of the coefficients.
Equality as formal sums: every cell has the same coefficient in both, by the field's own equality (a field element can have several representations), whatever the order or the storage. Collapses both. Assumes obj has the same cell and coefficient types (only Chain is checked at runtime). Consistent with hashCode.
Equality as formal sums: every cell has the same coefficient in both, by the field's own equality (a field element can have several representations), whatever the order or the storage. Collapses both. Assumes obj has the same cell and coefficient types (only Chain is checked at runtime). Consistent with hashCode.
Attributes
- Definition Classes
-
Chain -> Any
- Inherited from:
- Chain
- Source
- Chain.scala
Consistent with equals, so chains can be keys of a hash set or map: it hashes each cell with a nonzero coefficient together with the field's Field.hash of that coefficient, blind to the order and the storage. Collapses the chain, as equals does. Over a field that compares within a tolerance (Field.DoubleApproximated) only the cells are hashed; a field of your own that keeps the default Field.hash is hashed by its cells too.
Consistent with equals, so chains can be keys of a hash set or map: it hashes each cell with a nonzero coefficient together with the field's Field.hash of that coefficient, blind to the order and the storage. Collapses the chain, as equals does. Over a field that compares within a tolerance (Field.DoubleApproximated) only the cells are hashed; a field of your own that keeps the default Field.hash is hashed by its cells too.
Attributes
- Definition Classes
-
Chain -> Any
- Inherited from:
- Chain
- Source
- Chain.scala
Whether the terms are stored packed (a PackedChain: decoded when read).
Whether the terms are stored packed (a PackedChain: decoded when read).
Attributes
- Inherited from:
- Chain
- Source
- Chain.scala
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Chain -> Any
- Inherited from:
- Chain
- Source
- Chain.scala