hgeometry-0.11.0.0: Geometric Algorithms, Data structures, and Data types.

Safe HaskellNone
LanguageHaskell2010

Algorithms.Geometry.SoS.Symbolic

Synopsis

Documentation

data EpsFold i Source #

Instances
Ord i => Eq (EpsFold i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

(==) :: EpsFold i -> EpsFold i -> Bool #

(/=) :: EpsFold i -> EpsFold i -> Bool #

Ord i => Ord (EpsFold i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

compare :: EpsFold i -> EpsFold i -> Ordering #

(<) :: EpsFold i -> EpsFold i -> Bool #

(<=) :: EpsFold i -> EpsFold i -> Bool #

(>) :: EpsFold i -> EpsFold i -> Bool #

(>=) :: EpsFold i -> EpsFold i -> Bool #

max :: EpsFold i -> EpsFold i -> EpsFold i #

min :: EpsFold i -> EpsFold i -> EpsFold i #

Show i => Show (EpsFold i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

showsPrec :: Int -> EpsFold i -> ShowS #

show :: EpsFold i -> String #

showList :: [EpsFold i] -> ShowS #

Ord i => Semigroup (EpsFold i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

(<>) :: EpsFold i -> EpsFold i -> EpsFold i #

sconcat :: NonEmpty (EpsFold i) -> EpsFold i #

stimes :: Integral b => b -> EpsFold i -> EpsFold i #

Ord i => Monoid (EpsFold i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

mempty :: EpsFold i #

mappend :: EpsFold i -> EpsFold i -> EpsFold i #

mconcat :: [EpsFold i] -> EpsFold i #

(Arbitrary i, Ord i) => Arbitrary (EpsFold i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

arbitrary :: Gen (EpsFold i) #

shrink :: EpsFold i -> [EpsFold i] #

eps :: i -> EpsFold i Source #

Creates the term \(\varepsilon(i)\)

mkEpsFold :: Ord i => [i] -> EpsFold i Source #

hasNoPertubation :: EpsFold i -> Bool Source #

Test if the epsfold has no pertubation at all (i.e. if it is \(\Pi_{\emptyset}\)

factors :: EpsFold i -> Bag i Source #

Gets the factors

suitableBase :: EpsFold i -> Int Source #

computes a base d that can be used as:

\( \varepsilon(i) = \varepsilon^{d^i} \)

data Term i r Source #

A term 'Term c es' represents a term:

\[ c \Pi_{i \in es} \varepsilon(i) \]

for a constant c and an arbitrarily small value \(\varepsilon\), parameterized by i.

Constructors

Term r (EpsFold i) 
Instances
Functor (Term i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

fmap :: (a -> b) -> Term i a -> Term i b #

(<$) :: a -> Term i b -> Term i a #

(Ord i, Eq r) => Eq (Term i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

(==) :: Term i r -> Term i r -> Bool #

(/=) :: Term i r -> Term i r -> Bool #

(Ord i, Ord r, Num r) => Ord (Term i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

compare :: Term i r -> Term i r -> Ordering #

(<) :: Term i r -> Term i r -> Bool #

(<=) :: Term i r -> Term i r -> Bool #

(>) :: Term i r -> Term i r -> Bool #

(>=) :: Term i r -> Term i r -> Bool #

max :: Term i r -> Term i r -> Term i r #

min :: Term i r -> Term i r -> Term i r #

(Show i, Show r) => Show (Term i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

showsPrec :: Int -> Term i r -> ShowS #

show :: Term i r -> String #

showList :: [Term i r] -> ShowS #

(Arbitrary r, Arbitrary (EpsFold i), Ord i) => Arbitrary (Term i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

arbitrary :: Gen (Term i r) #

shrink :: Term i r -> [Term i r] #

term :: r -> i -> Term i r Source #

Creates a singleton term

constantFactor :: Lens' (Term i r) r Source #

Lens to access the constant c in the term.

data Symbolic i r Source #

Represents a Sum of terms, i.e. a value that has the form:

\[ \sum c \Pi_i \varepsilon(i) \]

The terms are represented in order of decreasing significance.

The main idea in this type is that, if symbolic values contains \(\varepsilon(i)\) terms we can always order them. That is, two Symbolic terms will be equal only if:

  • they contain *only* a constant term (that is equal)
  • they contain the exact same \(\varepsilon\)-fold.
Instances
Functor (Symbolic i) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

fmap :: (a -> b) -> Symbolic i a -> Symbolic i b #

(<$) :: a -> Symbolic i b -> Symbolic i a #

(Ord i, Eq r, Num r) => Eq (Symbolic i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

(==) :: Symbolic i r -> Symbolic i r -> Bool #

(/=) :: Symbolic i r -> Symbolic i r -> Bool #

(Ord i, Num r, Eq r) => Num (Symbolic i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

(+) :: Symbolic i r -> Symbolic i r -> Symbolic i r #

(-) :: Symbolic i r -> Symbolic i r -> Symbolic i r #

(*) :: Symbolic i r -> Symbolic i r -> Symbolic i r #

negate :: Symbolic i r -> Symbolic i r #

abs :: Symbolic i r -> Symbolic i r #

signum :: Symbolic i r -> Symbolic i r #

fromInteger :: Integer -> Symbolic i r #

(Ord i, Ord r, Num r) => Ord (Symbolic i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

compare :: Symbolic i r -> Symbolic i r -> Ordering #

(<) :: Symbolic i r -> Symbolic i r -> Bool #

(<=) :: Symbolic i r -> Symbolic i r -> Bool #

(>) :: Symbolic i r -> Symbolic i r -> Bool #

(>=) :: Symbolic i r -> Symbolic i r -> Bool #

max :: Symbolic i r -> Symbolic i r -> Symbolic i r #

min :: Symbolic i r -> Symbolic i r -> Symbolic i r #

(Show i, Show r) => Show (Symbolic i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

showsPrec :: Int -> Symbolic i r -> ShowS #

show :: Symbolic i r -> String #

showList :: [Symbolic i r] -> ShowS #

(Arbitrary r, Ord i, Arbitrary (EpsFold i)) => Arbitrary (Symbolic i r) Source # 
Instance details

Defined in Algorithms.Geometry.SoS.Symbolic

Methods

arbitrary :: Gen (Symbolic i r) #

shrink :: Symbolic i r -> [Symbolic i r] #

constant :: Ord i => r -> Symbolic i r Source #

Creates a constant symbolic value

symbolic :: Ord i => r -> i -> Symbolic i r Source #

Creates a symbolic vlaue with a single indexed term. If you just need a constant (i.e. non-indexed), use constant

perturb :: (Num r, Ord i) => r -> i -> Symbolic i r Source #

given the value c and the index i, creates the perturbed value \(c + \varepsilon(i)\)

toTerms :: Symbolic i r -> [Term i r] Source #

Produces a list of terms, in decreasing order of significance

signOf :: (Num r, Eq r) => Symbolic i r -> Maybe Sign Source #

Computing the Sign of an expression. (Nothing represents zero)