Coder Social home page Coder Social logo

meet-forever / haskell_binary_relation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 18 KB

🔍Haskell Binary Relation: Streamlined analysis of relations on sets - Empty, Universal, Reflexive, Symmetric, Antisymmetric, Transitive, Equivalence. Recreate Reflexive, Symmetric, Transitive Closures. Simplify relation analysis in Haskell for enhanced productivity. 🚀

License: GNU General Public License v3.0

Haskell 100.00%
binary-relations haskell

haskell_binary_relation's Introduction

Haskell Binary Relation

Project idea and instruction taken from: PLC-Project2

"If there are two sets, and we want to check if there is any connection between the two, we use relations." -- Meet Patel

Available Relations

- Empty
- Universal
- Reflexive
- Symmetric
- Antisymmetric
- Transitive
- Equivalence 
"The closure of a subset is the result of a closure operator applied to the subset. The closure of a subset under some operations is the smallest subset that is closed under these operations. It is often called the span (for example linear span) or the generated set." -- Wikipedia

Available Closures

- Reflexive Closure
- Symmetric Closure
- Transitive Closure

Sample Run:

*Main> r1 = add (1,2) (add (2,3) (add (3,4) emptyBinaryRelation)) 
*Main> r2 = add (1,2) (add (3, 4) (add (2,3) emptyBinaryRelation))
*Main> reflexive r1
False
*Main> symmetric r2
False
*Main> r2' = symmetricClosure r2
*Main> symmetric r2'
True
*Main> toString r2'
"[(1,2),(2,1),(2,3),(3,2),(3,4),(4,3)]"

haskell_binary_relation's People

Contributors

meet-forever avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.