Package

com.stripe

dagon

Permalink

package dagon

Collection of graph algorithms

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. dagon
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type BoolT[T] = Boolean

    Permalink
  2. abstract class DependantGraph[T] extends AnyRef

    Permalink

    Given Dag and a List of immutable nodes, and a function to get dependencies, compute the dependants (reverse the graph)

  3. sealed trait Expr[N[_], T] extends AnyRef

    Permalink

    Expr[N, T] is an expression of a graph of container nodes N[_] with result type N[T].

    Expr[N, T] is an expression of a graph of container nodes N[_] with result type N[T]. These expressions are like the Literal[T, N] graphs except that functions always operate with an indirection of a Id[T] where N[T] is the type of the input node.

    Nodes can be deleted from the graph by replacing an Expr at Id = idA with Var(idB) pointing to some upstream node.

    To add nodes to the graph, add depth to the final node returned in a Unary or Binary expression.

    TODO: see the approach here: https://gist.github.com/pchiusano/1369239 Which seems to show a way to do currying, so we can handle general arity

  4. sealed trait ExpressionDag[N[_]] extends AnyRef

    Permalink
  5. trait FunctionK[T[_], R[_]] extends AnyRef

    Permalink

    This is a Natural transformation.

    This is a Natural transformation.

    For any type X, this type can produce a function from T[X] to R[X].

  6. sealed class HCache[K[_], V[_]] extends AnyRef

    Permalink

    This is a useful cache for memoizing heterogenously types functions

  7. final class HMap[K[_], V[_]] extends AnyRef

    Permalink

    This is a weak heterogenous map.

    This is a weak heterogenous map. It uses equals on the keys, so it is your responsibilty that if k: K[_] == k2: K[_] then the types are actually equal (either be careful or store a type identifier).

  8. final case class Id[T](id: Int) extends Product with Serializable

    Permalink

    The Expressions are assigned Ids.

    The Expressions are assigned Ids. Each Id is associated with an expression of inner type T.

    This is done to put an indirection in the ExpressionDag that allows us to rewrite nodes by simply replacing the expressions associated with given Ids.

    T is a phantom type used by the type system

  9. sealed trait Literal[N[_], T] extends AnyRef

    Permalink

    This represents literal expressions (no variable redirection) of container nodes of type N[T]

  10. type NeighborFn[T] = (T) ⇒ Iterable[T]

    Permalink
  11. trait PartialRule[N[_]] extends Rule[N]

    Permalink

    Often a partial function is an easier way to express rules

  12. trait Rule[N[_]] extends AnyRef

    Permalink

    This implements a simplification rule on ExpressionDags

Value Members

  1. object Expr

    Permalink
  2. object ExpressionDag

    Permalink
  3. object Graphs

    Permalink
  4. object HCache

    Permalink
  5. object HMap

    Permalink
  6. object Literal

    Permalink
  7. object Memoize

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped