Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/namusyaka/qm
Quine-McCluskey algorithm implementation written in Go
https://github.com/namusyaka/qm
Last synced: about 1 month ago
JSON representation
Quine-McCluskey algorithm implementation written in Go
- Host: GitHub
- URL: https://github.com/namusyaka/qm
- Owner: namusyaka
- License: mit
- Created: 2017-12-03T14:29:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T13:41:51.000Z (almost 7 years ago)
- Last Synced: 2024-06-20T17:53:30.317Z (5 months ago)
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qm
Quine-McCluskey algorithm implementation written in Go
## Usage
```go
package mainimport (
"github.com/namusyaka/qm"
"fmt"
)func main() {
// Registers boolean function.
q := qm.New([]string{"A", "B", "C", "D"})// Calculates minified boolean function expressed as a sum of products.
// And returns its complexity and result.
complex, set := q.Solve([]int{4, 8, 10, 11, 12, 15}, []int{9, 14})
fmt.Printf("complexity: %d\n", complex)
fmt.Printf("set: %v\n", set)// Get boolean function.
b := q.GetBoolFunc(set)
fmt.Printf("boolean func: '%s'\n", b)
}
```