euclid

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.New().SetOutputToNil().SetPrefix(func(s string) string {
	return color.New().SetFontBold().Colorful("Log     ")
})

Functions

func Divide

func Divide(a int, b int) (int, int)

func ExGCD

func ExGCD(a int, b int, plus Operator, multiplus Operator, divide Operator2) (r int, x int, y int)

ExGCD extend GCD algorithm

func GCD

func GCD(a int, b int, plus Operator, multiplus Operator, divide Operator2) int

GCD get the maximum common factor

func Multiplus

func Multiplus(a int, b int) int

func Plus

func Plus(a int, b int) int

Types

type Operator

type Operator func(int, int) int

type Operator2

type Operator2 func(int, int) (int, int)

Jump to

Keyboard shortcuts

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