opt

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package opt implements generic optimizations that remove redundancy from addition chains.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Optimize

func Optimize(c addchain.Chain) (addchain.Chain, error)

Optimize aims to remove redundancy from an addition chain.

Types

type Algorithm

type Algorithm struct {
	Algorithm alg.ChainAlgorithm
}

Algorithm applies chain optimization to the result of a wrapped algorithm.

func (Algorithm) FindChain

func (a Algorithm) FindChain(n *big.Int) (addchain.Chain, error)

FindChain delegates to the wrapped algorithm, then runs Optimize on the result.

func (Algorithm) String

func (a Algorithm) String() string

Jump to

Keyboard shortcuts

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