Copyright | (c) Fabricio Olivetti 2021 - 2021 |
---|---|
License | BSD3 |
Maintainer | fabricio.olivetti@gmail.com |
Stability | experimental |
Portability | |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Conversion functions to display the expression trees in different formats.
Synopsis
- data DisplayNodes ix val = D {
- _displayVar :: ix -> String
- _displayPar :: ix -> String
- _displayVal :: val -> String
- _displayFun :: Function -> String
- _displayPow :: String
- _displayFloatPow :: String
- showExpr :: (Show ix, Show val) => SRTree ix val -> DisplayNodes ix val -> String
- showTree :: (Show ix, Show val) => SRTree ix val -> DisplayNodes ix val -> String
- printExpr :: (Show ix, Show val) => SRTree ix val -> DisplayNodes ix val -> IO ()
- showDefault :: (Show ix, Show val) => SRTree ix val -> String
- showTikz :: (Show ix, Show val, RealFrac val) => SRTree ix val -> String
- showPython :: (Show ix, Show val) => SRTree ix val -> String
- showLatex :: (Show ix, Show val) => SRTree ix val -> String
Documentation
data DisplayNodes ix val Source #
Data structure containing the needed definitions to print a SRTree.
D | |
|
showExpr :: (Show ix, Show val) => SRTree ix val -> DisplayNodes ix val -> String Source #
Converts a tree to a String
using the specifications given by DisplayNodes
showTree :: (Show ix, Show val) => SRTree ix val -> DisplayNodes ix val -> String Source #
Converts a tree to a String
using the specifications given by DisplayNodes
printExpr :: (Show ix, Show val) => SRTree ix val -> DisplayNodes ix val -> IO () Source #
Prints a tree as an expression using the specifications given by DisplayNodes
showDefault :: (Show ix, Show val) => SRTree ix val -> String Source #
Displays a tree as an expression
showTikz :: (Show ix, Show val, RealFrac val) => SRTree ix val -> String Source #
Displays a tree in Tikz format