tools

package
v0.0.0-...-c9443ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateWeight

func CalculateWeight(cell Point, data *[]Point, exp float64) float64

func ChangeExtension

func ChangeExtension(filename string, ext string) string

func ChannelSize

func ChannelSize(appxSubprocess uint64, appxOverhead uint64) int

Memory Management

func DistExp

func DistExp(p0, p Point, exp float64) float64

func GetChunkBlock

func GetChunkBlock(row, chunkR, chunkC int, xInfo Info, yInfo Info) (int, int)

func GetDimensions

func GetDimensions(xInfo Info, yInfo Info) (int, int)

func MakeCoordSpace

func MakeCoordSpace(listPoints *[]Point, xInfo Info, yInfo Info) map[OrderedPair]Point

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

Start Basic Utilites

func PairToRC

func PairToRC(pair OrderedPair) (int, int)

func PartialWeight

func PartialWeight(p0, p Point, exp float64) float64

p0 is grid location, p is weighted point to compare to

func RoundUp

func RoundUp(num, denom int) int

Start Math Functions

func SameFiles

func SameFiles(f1, f2 string) (bool, error)

func SetLogging

func SetLogging()

func Transpose

func Transpose(a [][]float64) [][]float64

Types

type Coord

type Coord struct {
	P    Point
	Pair OrderedPair
}

type Info

type Info struct {
	Min  float64 `default:"math.Inf(1)"`
	Max  float64 `default:"math.Inf(-1)"`
	Step float64 `default:"1.0"`
}

Info Structure For Conversions to and from Euclidean Space

func MakeInfo

func MakeInfo() Info

type OrderedPair

type OrderedPair struct {
	R int
	C int
}

func MakePair

func MakePair(r int, c int) OrderedPair

func PointToPair

func PointToPair(p Point, xInfo Info, yInfo Info) OrderedPair

func RCToPair

func RCToPair(r, c int) OrderedPair

type Point

type Point struct {
	X      float64
	Y      float64
	Weight float64
}

Start Point/OrderedPair/Coord and helper functions

func MakePoint

func MakePoint(x, y, w float64) Point

func PairToPoint

func PairToPoint(pair OrderedPair, xInfo Info, yInfo Info) Point

func RCToPoint

func RCToPoint(r int, c int, xInfo Info, yInfo Info) Point

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL