srtree-2.0.0.2: A general library to work with Symbolic Regression expression trees.
Copyright(c) Fabricio Olivetti 2021 - 2024
LicenseBSD3
Maintainer[email protected]
Stabilityexperimental
Portability
Safe HaskellNone
LanguageHaskell2010

Algorithm.EqSat.Info

Description

Functions related to info/data calculation in Equality Graph data structure Heavily based on hegg (https:/github.comalt-romes/hegg by alt-romes)

Synopsis

Data related functions

joinData :: EClassData -> EClassData -> EClassData Source #

join data from two e-classes TODO: instead of folding, just do not apply rules list of values instead of single value

makeAnalysis :: forall (m :: Type -> Type). Monad m => CostFun -> ENode -> EGraphST m EClassData Source #

Calculate e-node data (constant values and cost)

getChildrenMinHeight :: forall (m :: Type -> Type). Monad m => ENode -> EGraphST m Int Source #

calculateHeights :: forall (m :: Type -> Type). Monad m => EGraphST m () Source #

update the heights of each e-class won't work if there's no root

calculateCost :: forall (m :: Type -> Type). Monad m => CostFun -> SRTree EClassId -> EGraphST m Cost Source #

calculates the cost of a node

calculateConsts :: forall (m :: Type -> Type). Monad m => SRTree EClassId -> EGraphST m Consts Source #

check whether an e-node evaluates to a const

insertFitness :: forall (m :: Type -> Type). Monad m => EClassId -> Double -> PVector -> EGraphST m () Source #