coefficient

package
v0.0.0-...-78d9b97 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pairing

type Pairing struct {
	PowerN           int
	PowerM           int
	NegateMultiplier bool
}

Pairing notes the multiplier and the powers applied to a oldformula term.

func (Pairing) GenerateCoefficientSets

func (pairing Pairing) GenerateCoefficientSets(relationships []Relationship) []*Pairing

GenerateCoefficientSets creates a list of locked coefficient sets (powers and multipliers)

based on a given list of relationships.

type Relationship

type Relationship string

Relationship relates how a pair of coordinates should be applied.

const (
	PlusNPlusM                                Relationship = "+N+M"
	PlusMPlusN                                Relationship = "+M+N"
	MinusNMinusM                              Relationship = "-N-M"
	MinusMMinusN                              Relationship = "-M-N"
	PlusMPlusNNegateMultiplierIfOddPowerSum   Relationship = "+M+NF(N+M)"
	MinusMMinusNNegateMultiplierIfOddPowerSum Relationship = "-M-NF(N+M)"
	PlusMMinusSumNAndM                        Relationship = "+M-(N+M)"
	MinusSumNAndMPlusN                        Relationship = "-(N+M)+N"
	PlusMMinusN                               Relationship = "+M-N"
	MinusMPlusN                               Relationship = "-M+N"
	PlusNMinusM                               Relationship = "+N-M"
	PlusNMinusMNegateMultiplierIfOddPowerN    Relationship = "+N-MF(N)"
	MinusNPlusMNegateMultiplierIfOddPowerN    Relationship = "-N+MF(N)"
	MinusNPlusM                               Relationship = "-N+M"
	PlusNMinusMNegateMultiplierIfOddPowerSum  Relationship = "+N-MF(N+M)"
	MinusNPlusMNegateMultiplierIfOddPowerSum  Relationship = "-N+MF(N+M)"
)

Relationship s determine the order and sign of powers n and m.

  Plus means *1, Minus means *-1
  If N appears first the powers then power N is applied to the number and power M to the complex conjugate.
  If M appears first the powers then power M is applied to the number and power N to the complex conjugate.
	 MaybeFlipScale will multiply the scale by -1 if N + M is odd.

Jump to

Keyboard shortcuts

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