DFT 带阻滤波器

This commit is contained in:
nuknal
2024-06-21 12:47:14 +08:00
parent e13038474a
commit d99b8a9740
16 changed files with 292 additions and 309 deletions

View File

@@ -1,12 +1,5 @@
package rrc
import (
"runtime"
"github.com/dustin/go-humanize"
log "github.com/sirupsen/logrus"
)
func searchVL(V []float64, Sik float64) int {
left, right := 0, len(V)-2
@@ -31,16 +24,3 @@ func searchVL(V []float64, Sik float64) int {
// Return -1 if no such position is found
return -1
}
var lastTotalFreed uint64
func printMemStats() {
var m runtime.MemStats
runtime.ReadMemStats(&m)
log.Printf("[Memory] Alloc = %v TotalAlloc=%v Just Freed = %v Sys = %v NumGc=%v",
humanize.Bytes(m.Alloc),
humanize.Bytes(m.TotalAlloc),
humanize.Bytes(((m.TotalAlloc - m.Alloc) - lastTotalFreed)),
humanize.Bytes(m.Sys), m.NumGC)
lastTotalFreed = m.TotalAlloc - m.Alloc
}