fuzzy

package module
v0.0.0-...-640aba1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: MIT Imports: 4 Imported by: 0

README

fuzzy Build Status Coverage Status GoDoc

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrispMF

func CrispMF(x float64) float64

CrispMF func

func EmptyMF

func EmptyMF(x float64) float64

EmptyMF func

Types

type MembershipFunc

type MembershipFunc func(float64) float64

MembershipFunc type

func NewBellMF

func NewBellMF(a, b, c float64) MembershipFunc

NewBellMF func

func NewDiffSigmoidMF

func NewDiffSigmoidMF(a, b, c, d float64) MembershipFunc

NewDiffSigmoidMF func

func NewGaussianComboMF

func NewGaussianComboMF(mu1, sigma1, mu2, sigma2 float64) MembershipFunc

NewGaussianComboMF func

func NewGaussianMF

func NewGaussianMF(mu, sigma float64) MembershipFunc

NewGaussianMF func

func NewSigmoidMF

func NewSigmoidMF(a, b float64) MembershipFunc

NewSigmoidMF func

func NewTrapMF

func NewTrapMF(a, b, c, d float64) MembershipFunc

NewTrapMF func

func NewTriangleMF

func NewTriangleMF(a, b, c float64) MembershipFunc

NewTriangleMF func

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set struct

func NewCrispSet

func NewCrispSet(u []float64) Set

NewCrispSet func

Example
s := NewCrispSet([]float64{1, 2, 3, 4})

fmt.Println(s)
Output:

{1/1, 1/2, 1/3, 1/4}

func NewEmptySet

func NewEmptySet() Set

NewEmptySet func

Example
s := NewEmptySet()

fmt.Println(s)
Output:

{}

func NewFuzzySet

func NewFuzzySet(u, g []float64) Set

NewFuzzySet func

Example
s := NewFuzzySet([]float64{1, 2, 3, 4}, []float64{0.1, 0.2, 0.3, 0.4})

fmt.Println(s)
Output:

{0.1/1, 0.2/2, 0.3/3, 0.4/4}

func NewFuzzySetFromMF

func NewFuzzySetFromMF(u []float64, m MembershipFunc) Set

NewFuzzySetFromMF func

Example
a := NewFuzzySetFromMF([]float64{1, 2, 3, 4}, EmptyMF)
b := NewFuzzySetFromMF([]float64{1, 2, 3, 4}, CrispMF)
c := NewFuzzySetFromMF(
	[]float64{1, 2, 3, 4},
	func(x float64) float64 {
		return 0.5
	},
)
d := NewFuzzySetFromMF(
	[]float64{0, 1, 2, 3, 4, 5},
	NewTrapMF(0, 2, 3, 5),
)

fmt.Println(a)
fmt.Println(b)
fmt.Println(c)
fmt.Println(d)
Output:

{0/1, 0/2, 0/3, 0/4}
{1/1, 1/2, 1/3, 1/4}
{0.5/1, 0.5/2, 0.5/3, 0.5/4}
{0/0, 0.5/1, 1/2, 1/3, 0.5/4, 0/5}

func (*Set) AddElement

func (s *Set) AddElement(u, g float64)

AddElement method

func (Set) AlphaCut

func (s Set) AlphaCut(alpha float64) Set

AlphaCut func

func (Set) Centroid

func (s Set) Centroid() float64

Centroid method

func (Set) Compliment

func (s Set) Compliment() Set

Compliment method

func (Set) Core

func (s Set) Core() Set

Core func

func (Set) Elements

func (s Set) Elements() []float64

Elements func

func (Set) Grade

func (s Set) Grade(u float64) float64

Grade method

func (Set) Grades

func (s Set) Grades() []float64

Grades func

func (Set) Intersection

func (s Set) Intersection(other Set) Set

Intersection method

func (Set) IsCrisp

func (s Set) IsCrisp() bool

IsCrisp func

func (Set) IsEmpty

func (s Set) IsEmpty() bool

IsEmpty func

func (Set) IsEqual

func (s Set) IsEqual(other Set) bool

IsEqual func

func (Set) String

func (s Set) String() string

func (Set) StrongAlphaCut

func (s Set) StrongAlphaCut(alpha float64) Set

StrongAlphaCut func

func (Set) Support

func (s Set) Support() Set

Support func

func (Set) Union

func (s Set) Union(other Set) Set

Union method

Jump to

Keyboard shortcuts

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