Monoid
com.phasmidsoftware.visitor.core.Monoid
Typeclass: an associative binary operation with an identity element.
Extends Zero with combine. Mirrors the Cats Monoid typeclass but without the Cats dependency.
Primary use in Visitor/Gryphon:
- Dijkstra needs both
identity(seed cost) andcombine(path cost accumulation). - Prim needs only
identity— useZero[E]for Prim,Monoid[E]for Dijkstra.
Type parameters
- A
-
the element type
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object given_Monoid_Doubleobject given_Monoid_Floatobject given_Monoid_Intobject given_Monoid_Long
Members list
In this article