module Data.Number.ER.Real.DomainBox
(
VariableID(..),
DomainBox(..),
DomainIntBox(..)
)
where
import qualified Data.Number.ER.Real.Approx as RA
import Data.Number.ER.BasicTypes
import qualified Data.Set as Set
import qualified Data.Map as Map
import Prelude hiding (lookup)
class (Ord varid) => VariableID varid
where
newVarID :: Set.Set varid -> varid
defaultVar :: varid
defaultVar = newVarID Set.empty
showVar :: varid -> String
class (VariableID varid) => DomainBox box varid ira
| box -> varid ira, varid ira -> box
where
noinfo :: box
isNoinfo :: box -> Bool
unary :: ira -> box
singleton :: varid -> ira -> box
toList :: box -> [(varid, ira)]
fromList :: [(varid, ira)] -> box
toAscList :: box -> [(varid, ira)]
fromAscList :: [(varid, ira)] -> box
toMap :: box -> Map.Map varid ira
fromMap :: Map.Map varid ira -> box
insert :: varid -> ira -> box -> box
insertWith :: (ira -> ira -> ira) -> varid -> ira -> box -> box
delete :: varid -> box -> box
member :: varid -> box -> Bool
notMember :: varid -> box -> Bool
union :: box -> box -> box
unionWith :: (ira -> ira -> ira) -> box -> box -> box
keys :: box -> [varid]
elems :: box -> [ira]
map :: (ira -> ira) -> box -> box
fold :: (ira -> a -> a) -> a -> box -> a
foldWithKey :: (varid -> ira -> a -> a) -> a -> box -> a
zipWith :: (ira -> ira -> a) -> box -> box -> [(varid, a)]
intersectionWith :: (ira -> ira -> ira) -> box -> box -> box
findWithDefault :: ira -> varid -> box -> ira
lookup ::
String ->
varid ->
box ->
ira
class (DomainBox box varid ira) => DomainIntBox box varid ira
| box -> varid ira, varid ira -> box
where
compatible ::
box ->
box ->
Bool
unify ::
String ->
box ->
box ->
box
bestSplit ::
box ->
(varid, ira)
classifyPosition ::
box ->
box ->
(Bool, Bool, Bool, Bool)