pack

package
v0.0.0-...-6d7316e Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

This package contains various tools for integrating functions.

Example
package main

import (
	"fmt"
)

const FOO = iota

func main() {
	pi := PolyIntegrator{}

	result := pi.Integrate(0, 10, 3)

	fmt.Println(result)

}
Output:

30

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuickSort

func QuickSort(nums ...float64) *[]float64

Types

type Integrator

type Integrator interface {
	Integrate(min, max float64, coefs ...float64) float64
}

type PolyIntegrator

type PolyIntegrator struct{}

func (*PolyIntegrator) Integrate

func (integrator *PolyIntegrator) Integrate(min, max float64, coefs ...float64) float64

type RiemannIntegrator

type RiemannIntegrator struct{}

func (*RiemannIntegrator) Integrate

func (ri *RiemannIntegrator) Integrate(min, max float64, coefs ...float64) float64

func (*RiemannIntegrator) IntegrateRiemann

func (ri *RiemannIntegrator) IntegrateRiemann(min, max float64, f XYFunc) float64

type XYFunc

type XYFunc func(x float64) float64

func CalcPoly

func CalcPoly(coefs ...float64) XYFunc

Jump to

Keyboard shortcuts

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