toysolver-0.1.0: Assorted decision procedures for SAT, Max-SAT, PB, MIP, etc

Copyright(c) Masahiro Sakai 2011-2013
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable (TypeFamilies)
Safe HaskellNone
LanguageHaskell2010

ToySolver.Data.Delta

Contents

Description

Augmenting number types with infinitesimal parameter δ.

Reference:

Synopsis

The Delta type

data Delta r Source

Delta r k represents r + kδ for symbolic infinitesimal parameter δ.

Constructors

Delta !r !r 

Instances

Eq r => Eq (Delta r) 
Ord r => Ord (Delta r) 
Show r => Show (Delta r) 
Num r => VectorSpace (Delta r) 
Num r => AdditiveGroup (Delta r) 
SolverValue (Delta Rational) 
type Scalar (Delta r) = r 

Construction

fromReal :: Num r => r -> Delta r Source

Conversion from a base r value to Delta r.

delta :: Num r => Delta r Source

symbolic infinitesimal parameter δ.

Query

realPart :: Delta r -> r Source

Extracts the real part..

deltaPart :: Delta r -> r Source

Extracts the δ part..

Relationship with integers

floor' :: (RealFrac r, Integral a) => Delta r -> a Source

Delta version of floor. floor' x returns the greatest integer not greater than x

ceiling' :: (RealFrac r, Integral a) => Delta r -> a Source

Delta version of ceiling. ceiling' x returns the least integer not less than x

isInteger' :: RealFrac r => Delta r -> Bool Source

Is this a integer?