{-| Module : FiniteCategories Description : An example of cocone category. Copyright : Guillaume Sabbagh 2021 License : GPL-3 Maintainer : guillaumesabbagh@protonmail.com Stability : experimental Portability : portable An example of cocone category. -} module ExampleConeCategory.ExampleCoconeCategory ( main ) where import RandomCompositionGraph.RandomCompositionGraph import System.Random import ExportGraphViz.ExportGraphViz import FiniteCategory.FiniteCategory import FunctorCategory.FunctorCategory import Diagram.Diagram import UsualCategories.Three import Utils.Sample import Data.Maybe import ConeCategory.ConeCategory import IO.PrettyPrint (rcg,newGen) = (mkRandomCompositionGraph 20 25 5 (mkStdGen 878)) (diag,newGen1) = (pickOne (ob FunctorCategory{sourceCat=Three, targetCat=rcg}) newGen) coconeCategory = mkCoconeCategory diag -- | Export the cocone category as a pdf with GraphViz. main = do putStrLn "Start of ExampleCoconeCategory" catToPdf rcg "OutputGraphViz/Examples/ConeCategory/Cocone/rcg" diagToPdf diag "OutputGraphViz/Examples/ConeCategory/Cocone/funct" diagToPdf2 diag "OutputGraphViz/Examples/ConeCategory/Cocone/diag" catToPdf coconeCategory "OutputGraphViz/Examples/ConeCategory/Cocone/coconeCategory" putStrLn "Colimits : " putStrLn $ pprint $ initialObjects coconeCategory putStrLn "End of ExampleCoconeCategory"