https://github.com/reactivebayes/bipartitefactorgraphs.jl
A Julia package for working with bipartite factor graphs
https://github.com/reactivebayes/bipartitefactorgraphs.jl
bayesian-inference bayesian-network bipartite-graphs graphs
Last synced: 7 months ago
JSON representation
A Julia package for working with bipartite factor graphs
- Host: GitHub
- URL: https://github.com/reactivebayes/bipartitefactorgraphs.jl
- Owner: ReactiveBayes
- License: mit
- Created: 2025-04-25T09:40:04.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-06-11T09:23:37.000Z (9 months ago)
- Last Synced: 2025-08-01T12:52:19.508Z (7 months ago)
- Topics: bayesian-inference, bayesian-network, bipartite-graphs, graphs
- Language: Julia
- Homepage: https://reactivebayes.github.io/BipartiteFactorGraphs.jl/
- Size: 531 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# BipartiteFactorGraphs.jl
[](https://reactiveBayes.github.io/BipartiteFactorGraphs.jl/stable/)
[](https://reactiveBayes.github.io/BipartiteFactorGraphs.jl/dev/)
[](https://github.com/ReactiveBayes/BipartiteFactorGraphs.jl/actions/workflows/CI.yml?query=branch%3Amain)
[](https://codecov.io/gh/ReactiveBayes/BipartiteFactorGraphs.jl)
[](https://github.com/JuliaTesting/Aqua.jl)
A Julia package for working with bipartite factor graphs, providing efficient data structures and algorithms for graph-based probabilistic inference.
The package is built on top of and is fully compatible with the [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl) package.
## Installation
```julia
using Pkg
Pkg.add("BipartiteFactorGraphs")
```
Or in Julia REPL press `]` to enter Pkg mode:
```julia
] add BipartiteFactorGraphs
```
## Features
- Flexible representation of bipartite factor graphs
- Efficient manipulation of graph structure
- Support for common graph operations
- Type-stable implementation for performance
## Basic Usage
```julia
using BipartiteFactorGraphs
# Create a new factor graph
g = BipartiteFactorGraph()
# Add variable and factor nodes
v1 = add_variable!(g)
v2 = add_variable!(g)
f1 = add_factor!(g, [v1, v2])
# Check connectivity
@assert is_connected(v1, f1)
@assert is_connected(v2, f1)
# Access node neighbors
neighbors_of_v1 = neighbors(g, v1)
neighbors_of_f1 = neighbors(g, f1)
# Get graph properties
@assert num_variables(g) == 2
@assert num_factors(g) == 1
```
## Documentation
For more detailed information about the package functionality, please refer to the [documentation](https://reactiveBayes.github.io/BipartiteFactorGraphs.jl/stable/).
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## License
This package is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.