| Maintainer | hapytexeu+gh@gmail.com |
|---|---|
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Dep.Algorithm.Synthesis
Description
This module defines functions to generate a sum-of-products or a product-of-sums with the given
function specified by a Three.
Synopsis
- synthesis :: Three ThreeValue -> SumOfProducts
- synthesis' :: Three ThreeValue -> SumOfProducts'
- synthesisSOP :: Three ThreeValue -> SumOfProducts
- synthesisSOP' :: Three ThreeValue -> SumOfProducts'
- synthesisPOS :: Three ThreeValue -> ProductOfSums
- synthesisPOS' :: Three ThreeValue -> ProductOfSums'
- type WeightedProduct = (Int, Product')
- type WeightedSum = (Int, Sum')
- upperbound :: Three ThreeValue -> Three Bool
- lowerbound :: Three ThreeValue -> Three Bool
- extractProduct :: Int -> Three Bool -> Three ThreeValue -> Maybe WeightedProduct
- extractSum :: Int -> Three Bool -> Three ThreeValue -> Maybe WeightedSum
- wipeout :: Product' -> Three ThreeValue -> Three ThreeValue
- wipeout' :: Product' -> Three ThreeValue -> Three ThreeValue
Synthesize a Three
Arguments
| :: Three ThreeValue | The |
| -> SumOfProducts | The sum of products that work with the function defined in the |
Create a SumOfProducts object based on the given Three of ThreeValues. This function acts
as an alias for the synthesisSOP function.
Arguments
| :: Three ThreeValue | The |
| -> SumOfProducts' | The sum of products that work with the function defined in the |
Create a sum-of-products for the given function of ThreeValue. This function is an alias of
the synthesisSOP function.
Arguments
| :: Three ThreeValue | The |
| -> SumOfProducts | The sum of products that work with the function defined in the |
Create a SumOfProducts object based on the given Three of ThreeValues.
Arguments
| :: Three ThreeValue | The |
| -> SumOfProducts' | The sum of products that work with the function defined in the |
Create a sum-of-products for the given function of ThreeValue.
Arguments
| :: Three ThreeValue | The |
| -> ProductOfSums | The product of sums that work with the function defined in the |
Create a ProductOfSums object based on the given Three of ThreeValues.
Arguments
| :: Three ThreeValue | The |
| -> ProductOfSums' | The sum of products that work with the function defined in the |
Create a sum-of-products for the given function of ThreeValue.
Weigthed variants of the product and sum
type WeightedProduct = (Int, Product') Source #
A 2-tuple where the first item is the "weight" of the product, and the second one the corresponding Product'.
type WeightedSum = (Int, Sum') Source #
A 2-tuple where the first item is the "weight" of the sum, and the second one the corresponding Sum'.
Create an upper and lowerbound Three
Arguments
| :: Three ThreeValue | The given |
| -> Three Bool | The corresponding upperbound. |
Arguments
| :: Three ThreeValue | The given |
| -> Three Bool | The corresponding lowerbound. |
Extract products and sums
Arguments
| :: Int | The maximum depth of the |
| -> Three Bool | A |
| -> Three ThreeValue | The |
| -> Maybe WeightedProduct | A 2-tuple that contains the path to the leaf and the number of |
Arguments
| :: Int | The maximum depth of the |
| -> Three Bool | A |
| -> Three ThreeValue | The |
| -> Maybe WeightedSum | A 2-tuple that contains the path to the leaf and the number of |
Processing a Three
Arguments
| :: Product' | The product that specifies the path of the element(s) to set to |
| -> Three ThreeValue | The original |
| -> Three ThreeValue | The resulting |
Arguments
| :: Product' | The product that specifies the path of the element(s) to set to |
| -> Three ThreeValue | The original |
| -> Three ThreeValue | The resulting |