Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xaionaro-go/wavelib
Go bindings for C library "wavelib"
https://github.com/xaionaro-go/wavelib
bindings bior cgo cwt dwt go golang haar swt transform wavelet wavelib
Last synced: 1 day ago
JSON representation
Go bindings for C library "wavelib"
- Host: GitHub
- URL: https://github.com/xaionaro-go/wavelib
- Owner: xaionaro-go
- License: cc0-1.0
- Created: 2021-11-13T00:33:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-13T00:45:58.000Z (about 3 years ago)
- Last Synced: 2024-12-18T08:40:21.895Z (24 days ago)
- Topics: bindings, bior, cgo, cwt, dwt, go, golang, haar, swt, transform, wavelet, wavelib
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - wavelib
README
[![GoDoc](https://godoc.org/github.com/xaionaro-go/wavelib?status.svg)](https://pkg.go.dev/github.com/xaionaro-go/wavelib?tab=doc)
# Example
```go
rand.Seed(0)
obj := WaveInit("bior3.5")
defer obj.Free()input := make([]float64, 256)
for idx := range input {
input[idx] = rand.Float64()
}wt := WTInit(obj, "swt", 256, 1)
defer wt.Free()SetWTConv(wt, "direct")
SWT(wt, input)
for _, value := range wt.Output() {
fmt.Printf("%g\n", value)
}output := make([]float64, 256)
ISWT(wt, output)diff := make([]float64, 256)
for i := 0; i < wt.SigLength(); i++ {
diff[i] = output[i] - input[i]
}fmt.Printf("\n MAX %g \n", absMax(diff))
WTSummary(wt)
```