README

Gonum Build Status Build status codecov.io coveralls.io GoDoc Go Report Card stability-unstable

Installation

The core packages of the Gonum suite are written in pure Go with some assembly. Installation is done using go get.

go get -u gonum.org/v1/gonum/...

Supported Go versions

Gonum supports and tests using the gc compiler on the two most recent Go releases on Linux (386, amd64 and arm64), macOS and Windows (both on amd64).

Release schedule

The Gonum modules are released on a six-month release schedule, aligned with the Go releases. i.e.: when Go-1.x is released, Gonum-v0.n.0 is released around the same time. Six months after, Go-1.x+1 is released, and Gonum-v0.n+1.0 as well.

The release schedule, based on the current Go release schedule is thus:

  • Gonum-v0.n.0: February
  • Gonum-v0.n+1.0: August

Build tags

The Gonum packages use a variety of build tags to set non-standard build conditions. Building Gonum applications will work without knowing how to use these tags, but they can be used during testing and to control the use of assembly and CGO code.

The current list of non-internal tags is as follows:

  • appengine — do not use assembly or unsafe
  • safe — synonym for appengine
  • bounds — use bounds checks even in internal calls
  • cblas — use CGO gonum.org/v1/netlib/blas/netlib BLAS implementation in tests (only in mat package)
  • noasm — do not use assembly implementations
  • tomita — use Tomita, Tanaka, Takahashi pivot choice for maximimal clique calculation, otherwise use random pivot (only in topo package)

Issues TODOs

If you find any bugs, feel free to file an issue on the github issue tracker. Discussions on API changes, added features, code review, or similar requests are preferred on the gonum-dev Google Group.

https://groups.google.com/forum/#!forum/gonum-dev

License

Original code is licensed under the Gonum License found in the LICENSE file. Portions of the code are subject to the additional licenses found in THIRD_PARTY_LICENSES. All third party code is licensed either under a BSD or MIT license.

Code in graph/formats/dot is dual licensed Public Domain Dedication and Gonum License, and users are free to choose the license which suits their needs for this code.

Expand ▾ Collapse ▴

Documentation

Overview

    Gonum is a set of packages designed to make writing numerical and scientific algorithms productive, performant, and scalable.

    Gonum contains libraries for matrices and linear algebra; statistics, probability distributions, and sampling; tools for function differentiation, integration, and optimization; network creation and analysis; and more.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Version

    func Version() (version, sum string)

      Version returns the version of Gonum and its checksum. The returned values are only valid in binaries built with module support.

      If a replace directive exists in the Gonum go.mod, the replace will be reported in the version in the following format:

      "version=>[replace-path] [replace-version]"
      

      and the replace sum will be returned in place of the original sum.

      The exact version format returned by Version may change in future.

      Types

      This section is empty.

      Source Files

      Directories

      Path Synopsis
      Package blas provides interfaces for the BLAS linear algebra standard.
      Package blas provides interfaces for the BLAS linear algebra standard.
      blas32
      Package blas32 provides a simple interface to the float32 BLAS API.
      Package blas32 provides a simple interface to the float32 BLAS API.
      blas64
      Package blas64 provides a simple interface to the float64 BLAS API.
      Package blas64 provides a simple interface to the float64 BLAS API.
      cblas128
      Package cblas128 provides a simple interface to the complex128 BLAS API.
      Package cblas128 provides a simple interface to the complex128 BLAS API.
      cblas64
      Package cblas64 provides a simple interface to the complex64 BLAS API.
      Package cblas64 provides a simple interface to the complex64 BLAS API.
      gonum
      Package gonum is a Go implementation of the BLAS API.
      Package gonum is a Go implementation of the BLAS API.
      testblas
      Package testblas provides tests for blas implementations.
      Package testblas provides tests for blas implementations.
      testblas/benchautogen
      Script for automatic code generation of the benchmark routines.
      Script for automatic code generation of the benchmark routines.
      Package cmplxs provides a set of helper routines for dealing with slices of complex128.
      Package cmplxs provides a set of helper routines for dealing with slices of complex128.
      cscalar
      Package cscalar provides a set of helper routines for dealing with complex128 values.
      Package cscalar provides a set of helper routines for dealing with complex128 values.
      diff
      fd
      Package fd provides functions to approximate derivatives using finite differences.
      Package fd provides functions to approximate derivatives using finite differences.
      dsp
      fourier
      Package fourier provides functions to perform Discrete Fourier Transforms.
      Package fourier provides functions to perform Discrete Fourier Transforms.
      fourier/internal/fftpack
      Package fftpack implements Discrete Fourier Transform functions ported from the Fortran implementation of FFTPACK.
      Package fftpack implements Discrete Fourier Transform functions ported from the Fortran implementation of FFTPACK.
      window
      Package window provides a set of functions to perform the transformation of sequence by different window functions.
      Package window provides a set of functions to perform the transformation of sequence by different window functions.
      Package floats provides a set of helper routines for dealing with slices of float64.
      Package floats provides a set of helper routines for dealing with slices of float64.
      scalar
      Package scalar provides a set of helper routines for dealing with float64 values.
      Package scalar provides a set of helper routines for dealing with float64 values.
      Package graph defines graph interfaces.
      Package graph defines graph interfaces.
      community
      Package community provides graph community detection functions.
      Package community provides graph community detection functions.
      encoding
      Package encoding provides a common graph encoding API.
      Package encoding provides a common graph encoding API.
      encoding/digraph6
      Package digraph6 implements graphs specified by digraph6 strings.
      Package digraph6 implements graphs specified by digraph6 strings.
      encoding/dot
      Package dot implements GraphViz DOT marshaling and unmarshaling of graphs.
      Package dot implements GraphViz DOT marshaling and unmarshaling of graphs.
      encoding/graph6
      Package graph6 implements graphs specified by graph6 strings.
      Package graph6 implements graphs specified by graph6 strings.
      encoding/graphql
      Package graphql implements JSON marshaling and unmarshaling of graph as used by GraphQL
      Package graphql implements JSON marshaling and unmarshaling of graph as used by GraphQL
      flow
      Package flow provides control flow analysis functions.
      Package flow provides control flow analysis functions.
      formats/cytoscapejs
      Package cytoscapejs implements marshaling and unmarshaling of Cytoscape.js JSON documents.
      Package cytoscapejs implements marshaling and unmarshaling of Cytoscape.js JSON documents.
      formats/dot
      Package dot implements a parser for Graphviz DOT files.
      Package dot implements a parser for Graphviz DOT files.
      formats/dot/ast
      Package ast declares the types used to represent abstract syntax trees of Graphviz DOT graphs.
      Package ast declares the types used to represent abstract syntax trees of Graphviz DOT graphs.
      formats/dot/internal/astx
      Package astx implements utility functions for generating abstract syntax trees of Graphviz DOT graphs.
      Package astx implements utility functions for generating abstract syntax trees of Graphviz DOT graphs.
      formats/dot/internal/errors
      Package error provides generated internal error functions for DOT parsing.
      Package error provides generated internal error functions for DOT parsing.
      formats/dot/internal/lexer
      Package lexer provides generated internal lexer functions for DOT parsing.
      Package lexer provides generated internal lexer functions for DOT parsing.
      formats/dot/internal/parser
      Package parser provides generated internal parsing functions for DOT parsing.
      Package parser provides generated internal parsing functions for DOT parsing.
      formats/dot/internal/token
      Package token provides generated internal tokenizing functions for DOT parsing.
      Package token provides generated internal tokenizing functions for DOT parsing.
      formats/dot/internal/util
      Package util provides generated internal utility functions for DOT parsing.
      Package util provides generated internal utility functions for DOT parsing.
      formats/gexf12
      Package gexf12 implements marshaling and unmarshaling of GEXF1.2 documents.
      Package gexf12 implements marshaling and unmarshaling of GEXF1.2 documents.
      formats/sigmajs
      Package sigmajs implements marshaling and unmarshaling of Sigma.js JSON documents.
      Package sigmajs implements marshaling and unmarshaling of Sigma.js JSON documents.
      graphs/gen
      Package gen provides random graph generation functions.
      Package gen provides random graph generation functions.
      internal/linear
      Package linear provides common linear data structures.
      Package linear provides common linear data structures.
      internal/ordered
      Package ordered provides common sort ordering types.
      Package ordered provides common sort ordering types.
      internal/set
      Package set provides integer and graph.Node sets.
      Package set provides integer and graph.Node sets.
      internal/uid
      Package uid implements unique ID provision for graphs.
      Package uid implements unique ID provision for graphs.
      iterator
      Package iterator provides node, edge and line iterators.
      Package iterator provides node, edge and line iterators.
      layout
      Package layout defines functions for performing graph layout.
      Package layout defines functions for performing graph layout.
      multi
      Package multi provides a suite of multigraph implementations satisfying the gonum/graph interfaces.
      Package multi provides a suite of multigraph implementations satisfying the gonum/graph interfaces.
      network
      Package network provides network analysis functions.
      Package network provides network analysis functions.
      path
      Package path provides graph path finding functions.
      Package path provides graph path finding functions.
      path/dynamic
      Package dynamic provides incremental heuristic graph path finding functions.
      Package dynamic provides incremental heuristic graph path finding functions.
      path/internal/testgraphs
      Package testsgraphs provides a number of graphs used for testing routines in the path and path/dynamic packages.
      Package testsgraphs provides a number of graphs used for testing routines in the path and path/dynamic packages.
      product
      Package product implements graph product functions.
      Package product implements graph product functions.
      simple
      Package simple provides a suite of simple graph implementations satisfying the gonum/graph interfaces.
      Package simple provides a suite of simple graph implementations satisfying the gonum/graph interfaces.
      spectral
      Package spectral provides graph spectral analysis functions.
      Package spectral provides graph spectral analysis functions.
      testgraph
      Package testgraph provides a set of testing helper functions that test Gonum graph interface implementations.
      Package testgraph provides a set of testing helper functions that test Gonum graph interface implementations.
      topo
      Package topo provides graph topology analysis functions.
      Package topo provides graph topology analysis functions.
      traverse
      Package traverse provides basic graph traversal primitives.
      Package traverse provides basic graph traversal primitives.
      Package integrate provides functions to compute an integral given a specific list of evaluations.
      Package integrate provides functions to compute an integral given a specific list of evaluations.
      quad
      Package quad provides numerical evaluation of definite integrals of single-variable functions.
      Package quad provides numerical evaluation of definite integrals of single-variable functions.
      testquad
      Package testquad provides integrals for testing quadrature algorithms.
      Package testquad provides integrals for testing quadrature algorithms.
      internal
      asm/c128
      Package c128 provides complex128 vector primitives.
      Package c128 provides complex128 vector primitives.
      asm/c64
      Package c64 provides complex64 vector primitives.
      Package c64 provides complex64 vector primitives.
      asm/f32
      Package f32 provides float32 vector primitives.
      Package f32 provides float32 vector primitives.
      asm/f64
      Package f64 provides float64 vector primitives.
      Package f64 provides float64 vector primitives.
      cmplx64
      Package cmplx64 provides complex64 versions of standard library math/cmplx package routines used by gonum/blas.
      Package cmplx64 provides complex64 versions of standard library math/cmplx package routines used by gonum/blas.
      math32
      Package math32 provides float32 versions of standard library math package routines used by gonum/blas/native.
      Package math32 provides float32 versions of standard library math package routines used by gonum/blas/native.
      testrand
      Package testrand provides random generation and flags for testing.
      Package testrand provides random generation and flags for testing.
      Package interp implements 1-dimensional algorithms for interpolating values.
      Package interp implements 1-dimensional algorithms for interpolating values.
      Package lapack provides interfaces for the LAPACK linear algebra standard.
      Package lapack provides interfaces for the LAPACK linear algebra standard.
      gonum
      Package gonum is a pure-go implementation of the LAPACK API.
      Package gonum is a pure-go implementation of the LAPACK API.
      lapack64
      Package lapack64 provides a set of convenient wrapper functions for LAPACK calls, as specified in the netlib standard (www.netlib.org).
      Package lapack64 provides a set of convenient wrapper functions for LAPACK calls, as specified in the netlib standard (www.netlib.org).
      testlapack
      Package testlapack implements a set of testing routines for Lapack functions.
      Package testlapack implements a set of testing routines for Lapack functions.
      Package mat provides implementations of float64 and complex128 matrix structures and linear algebra operations on them.
      Package mat provides implementations of float64 and complex128 matrix structures and linear algebra operations on them.
      Package mathext implements special math functions not implemented by the Go standard library.
      Package mathext implements special math functions not implemented by the Go standard library.
      internal/amos
      Package amos implements functions originally in the Netlib code by Donald Amos.
      Package amos implements functions originally in the Netlib code by Donald Amos.
      internal/cephes
      Package cephes implements functions originally in the Netlib code by Stephen Mosher.
      Package cephes implements functions originally in the Netlib code by Stephen Mosher.
      internal/gonum
      Package gonum contains functions implemented by the gonum team.
      Package gonum contains functions implemented by the gonum team.
      prng
      Package prng provides random source PRNG implementations.
      Package prng provides random source PRNG implementations.
      num
      dual
      Package dual provides the dual numeric type and functions.
      Package dual provides the dual numeric type and functions.
      dualcmplx
      Package dualcmplx provides the anti-commutative dual complex numeric type and functions.
      Package dualcmplx provides the anti-commutative dual complex numeric type and functions.
      dualquat
      Package dualquat provides the dual quaternion numeric type and functions.
      Package dualquat provides the dual quaternion numeric type and functions.
      hyperdual
      Package hyperdual provides the hyperdual numeric type and functions.
      Package hyperdual provides the hyperdual numeric type and functions.
      quat
      Package quat provides the quaternion numeric type and functions.
      Package quat provides the quaternion numeric type and functions.
      Package optimize implements algorithms for finding the optimum value of functions.
      Package optimize implements algorithms for finding the optimum value of functions.
      convex/lp
      Package lp implements routines to solve linear programming problems.
      Package lp implements routines to solve linear programming problems.
      functions
      Package functions provides objective functions for testing optimization algorithms.
      Package functions provides objective functions for testing optimization algorithms.
      spatial
      barneshut
      Package barneshut provides routines for calculating n-body force approximations using the Barnes-Hut algorithm.
      Package barneshut provides routines for calculating n-body force approximations using the Barnes-Hut algorithm.
      kdtree
      Package kdtree implements a k-d tree.
      Package kdtree implements a k-d tree.
      r1
      Package r1 provides 1D vectors and intervals and operations on them.
      Package r1 provides 1D vectors and intervals and operations on them.
      r2
      Package r2 provides 2D vectors and boxes and operations on them.
      Package r2 provides 2D vectors and boxes and operations on them.
      r3
      Package r3 provides 3D vectors and boxes and operations on them.
      Package r3 provides 3D vectors and boxes and operations on them.
      vptree
      Package vptree implements a vantage point tree.
      Package vptree implements a vantage point tree.
      Package stat provides generalized statistical functions.
      Package stat provides generalized statistical functions.
      card
      Package card provides cardinality estimation functions.
      Package card provides cardinality estimation functions.
      combin
      Package combin implements routines involving combinatorics (permutations, combinations, etc.).
      Package combin implements routines involving combinatorics (permutations, combinations, etc.).
      distmat
      Package distmat provides probability distributions over matrices.
      Package distmat provides probability distributions over matrices.
      distmv
      Package distmv provides multivariate random distribution types.
      Package distmv provides multivariate random distribution types.
      distuv
      Package distuv provides univariate random distribution types.
      Package distuv provides univariate random distribution types.
      mds
      Package mds provides multidimensional scaling functions.
      Package mds provides multidimensional scaling functions.
      samplemv
      Package samplemv implements advanced sampling routines from explicit and implicit probability distributions.
      Package samplemv implements advanced sampling routines from explicit and implicit probability distributions.
      sampleuv
      Package sampleuv implements advanced sampling routines from explicit and implicit probability distributions.
      Package sampleuv implements advanced sampling routines from explicit and implicit probability distributions.
      spatial
      Package spatial provides spatial statistical functions.
      Package spatial provides spatial statistical functions.
      Package unit provides a set of types and constants that facilitate the use of the International System of Units (SI).
      Package unit provides a set of types and constants that facilitate the use of the International System of Units (SI).
      constant
      Package constant provides fundamental constants satisfying unit.Uniter.
      Package constant provides fundamental constants satisfying unit.Uniter.