Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andeya/algorithm
/ functions
Functions
3,549 in github.com/andeya/algorithm
⨍
Functions
3,549
◇
Types & classes
331
↓ 8 callers
Function
minInt
(x, y int)
go.matrix/util.go:30
↓ 8 callers
Function
newDiceRollP
(number, faces, adder int, half bool, rng intRng, repeatOnMaxLast bool)
dice/dice.go:62
↓ 8 callers
Function
trmvTest
(t *testing.T, A *matrix.FloatMatrix, flags Flags, nb int)
matops/calgo/ttrm_test.go:19
↓ 7 callers
Method
Apply
Compute A = fn(A) by applying function fn element wise to A. If indexes array is non-empty function is applied to elements of A indexed by the content
matrix/dense_math.go:206
↓ 7 callers
Method
Copy
()
go.matrix/sparse.go:226
↓ 7 callers
Function
DecomposeCHOL
* * Compute the Cholesky factorization of a symmetric positive definite * N-by-N matrix A. * * Arguments: * A On entry, the symmetric matrix
matops/chol.go:115
↓ 7 callers
Function
DecomposeQRT
* * Compute QR factorization of a M-by-N matrix A using compact WY transformation: A = Q * R, * where Q = I - Y*T*Y.T, T is block reflector and Y ho
matops/qrwy.go:513
↓ 7 callers
Method
DenseMatrix
()
go.matrix/matrix.go:51
↓ 7 callers
Method
Floor
()
fixed/fixed.go:89
↓ 7 callers
Method
Inv
Compute in-place inverse A[i,j] = 1.0/A[i,j]. If indexes is empty calculates for all elements
matrix/dense_math.go:73
↓ 7 callers
Method
Inverse
()
go.matrix/pivot_basic.go:31
↓ 7 callers
Function
IsPrime
IsPrime returns true if n is prime. Typical run time is about 100 ns. TODO rename to IsPrimeUint32
mathutil/primes.go:26
↓ 7 callers
Function
MultDiag
* * Compute * C = C*diag(D) flags & RIGHT == true * C = diag(D)*C flags & LEFT == true * * Arguments * C M-by-N matrix if f
matops/diag.go:26
↓ 7 callers
Function
NewOSGB36Coord
Create a new OSGB36 coordinate from literals. The parameter prec plays an important role in how the literals are interpreted: OSGB36Auto - for easting
cartconvert/cartconvert/osgb36/osgb36.go:301
↓ 7 callers
Function
NewPos
(x, y float64)
pso-go/pso_test.go:43
↓ 7 callers
Function
ProbablyPrimeBigInt
ProbablyPrimeBigInt returns true if n is prime or n is a pseudoprime to base a. It implements the Miller-Rabin primality test for one specific value o
mathutil/mathutil.go:587
↓ 7 callers
Method
Reset
Reset cached score
ga/genome.go:20
↓ 7 callers
Function
SolveDiag
* * Compute * X = B*diag(D).-1 flags & RIGHT == true * X = diag(D).-1*C flags & LEFT == true * * Arguments: * B M-by-N matr
matops/diag.go:84
↓ 7 callers
Method
Stack
* Get a new matrix [A; B], with A above B. */
go.matrix/dense.go:198
↓ 7 callers
Method
SumPacked
Calculate sum of packed dimensions over set of keys.
cvx/sets/sets.go:225
↓ 7 callers
Method
add
(s segment)
polyclip-go/connector.go:33
↓ 7 callers
Function
bcnt
* From: http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan Counting bits set, Brian Kernighan's way unsigned int v; // count
mathutil/all_test.go:1018
↓ 7 callers
Function
bytes2String
(b []byte)
chinaid/china_id.go:257
↓ 7 callers
Function
continue1x3to1x2
* Repartition 1 by 2 blocks to 1 by 3 blocks. pRIGHT: AL | AR -- A0 A1 | A2 pLEFT: AL | AR <-- A0 | A1 A2 */
matops/partition.go:182
↓ 7 callers
Function
createorreturnconfig
(conf *config)
schoolcalc/webzapfen/config.go:45
↓ 7 callers
Function
endpointLess
The ordering is reversed because push and pop are faster. [MC: fragment from .c source below:] Return true means that [...] e1 is processed by the alg
polyclip-go/eventqueue.go:61
↓ 7 callers
Function
onError
(msg string)
matops/mmult.go:46
↓ 7 callers
Function
repartition1x2to1x3
* Repartition 1 by 2 blocks to 1 by 3 blocks. pRIGHT: AL | AR --> A0 | A1 A2 pLEFT: AL | AR --> A0 A1 | A2 Parameter As is left or right bl
matops/partition.go:153
↓ 7 callers
Function
stripTrailingZeros
(s string)
go-humanize/ftoa.go:5
↓ 6 callers
Method
Af
(u, v *matrix.FloatMatrix, alpha, beta float64, trans la.Option)
cvx/interfaces.go:44
↓ 6 callers
Method
Append
Append matrices to matrix set.
cvx/sets/sets.go:69
↓ 6 callers
Method
Clone
()
go-symexpr/types.go:132
↓ 6 callers
Function
DMultMV
Matrix-Vector operators blas GEMV; blocked version Y = alpha*A*X + beta*Y; Y is M*1, X is N*1 and A is M*N
matops/calgo/cmops.go:301
↓ 6 callers
Function
DecomposeLDL
* * Compute an LDLT factorization of a symmetric N-by-N matrix with partial pivoting. * * Arguments: * A On entry, the N-by-N matrix to be
matops/ldl.go:436
↓ 6 callers
Function
DotProduct
Dot-product of two Vectors.
vector/vector.go:191
↓ 6 callers
Method
ExpandToContainCoord
(p Coord)
geom/rect.go:73
↓ 6 callers
Function
FactorInt
FactorInt returns prime factorization of n > 1 or nil otherwise. Resulting factors are ordered by Prime. Typical run time is few µs.
mathutil/primes.go:273
↓ 6 callers
Function
FloatMatrixFromTable
Create a column-major matrix from a array of arrays. Parameter order indicates if data is array of rows (RowOrder) or array of columns (ColumnOrder).
matrix/dense.go:162
↓ 6 callers
Function
FloatNew
Create a column-major matrix from a flat array of elements. Assumes values are in column-major order.
matrix/dense.go:60
↓ 6 callers
Function
Ftoa
Ftoa converts a float to a string with no trailing zeros.
go-humanize/ftoa.go:21
↓ 6 callers
Method
Gf
(u, v *matrix.FloatMatrix, alpha, beta float64, trans la.Option)
cvx/interfaces.go:25
↓ 6 callers
Function
IsPrimeUint64
IsPrimeUint64 returns true if n is prime. Typical run time is few tens of µs. SPRP bases: http://miller-rabin.appspot.com
mathutil/primes.go:89
↓ 6 callers
Method
Length
()
geom/path.go:84
↓ 6 callers
Function
MVUpdateTrm
Matrix-vector triangular update A = A + alpha*X*Y.T A is N*N matrix, X is row or column vector of length N Y is row or column vector of legth N. flags
matops/mvec.go:161
↓ 6 callers
Function
MakeDenseCopy
(A MatrixRO)
go.matrix/dense.go:314
↓ 6 callers
Method
Modf
(y float64)
fixed/fixed.go:78
↓ 6 callers
Function
NewNull
()
go-symexpr/expr.go:168
↓ 6 callers
Function
NewSortStrider
(data Sort, stride int)
stat/types.go:100
↓ 6 callers
Function
Ones
(rows, cols int)
go.matrix/dense.go:256
↓ 6 callers
Method
ProbScores
ProbScores works the same as LogScores, but delivers actual probabilities as discussed above. Note that float64 underflow is possible if the word list
bayesian/bayesian.go:295
↓ 6 callers
Function
ProbablyPrimeBigInt_32
ProbablyPrimeBigInt_32 returns true if n is prime or n is a pseudoprime to base a. It implements the Miller-Rabin primality test for one specific valu
mathutil/mathutil.go:557
↓ 6 callers
Function
QuantileFromSortedData
* quantiles.go * * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, Brian Gough * Copyright (C) 2012, 2013 G.vd.Schoot * * This pro
stat/quantiles.go:26
↓ 6 callers
Method
Size
()
matops/simple_test.go:24
↓ 6 callers
Method
SparseMatrix
()
go.matrix/matrix.go:52
↓ 6 callers
Method
WriteTo
Serialize this classifier to GOB and write to Writer
bayesian/bayesian.go:432
↓ 6 callers
Function
_dmmat_rank_diag
matops/calgo/dmmat_rank.c:17
↓ 6 callers
Method
backup
backup steps back one rune. Can only be called once per call of next.
go-symexpr/lexer.go:188
↓ 6 callers
Function
benchmarkBig1eN
(b *testing.B, r *FCBig)
mathutil/all_test.go:260
↓ 6 callers
Function
benchmarkModPow
(b *testing.B, base, e, m uint32)
mathutil/mersenne/all_test.go:780
↓ 6 callers
Function
benchmarkModPowBig
(b *testing.B, base, e, m uint32)
mathutil/mersenne/all_test.go:789
↓ 6 callers
Function
benchmarkPopCountBigInt
(b *testing.B, bits int)
mathutil/all_test.go:3447
↓ 6 callers
Function
checkConeLpDimensions
(dims *sets.DimensionSet)
cvx/conelp.go:55
↓ 6 callers
Function
checkDims
=========================== [ Helper Functions ] =========================== Check if two vectors have the same dimension.
vector/vector.go:219
↓ 6 callers
Function
dump
(poly polyclip.Polygon)
polyclip-go/bugs_test.go:55
↓ 6 callers
Function
factor
(w Interface)
stat/wvariance.go:45
↓ 6 callers
Function
imin
(a, b int)
matops/lu.go:16
↓ 6 callers
Function
jnrm2
* Returns sqrt(x' * J * x) where J = [1, 0; 0, -I], for a vector x in a second order cone. */
cvx/misc.go:1412
↓ 6 callers
Function
leftAlignTerms
this function left aligns children terms ( ie move nils to end of terms[] ) and returns the number of children
go-symexpr/simp.go:939
↓ 6 callers
Function
makeComplexMatrix
Create a column-major matrix from a flat array of elements. Elements slice is not copied to internal elements but assigned, so underlying array holdin
matrix/cdense.go:482
↓ 6 callers
Function
makeFloatMatrix
Create a column-major matrix from a flat array of elements. Elements slice is not copied to internal elements but assigned, so underlying array holdin
matrix/dense.go:604
↓ 6 callers
Function
maxvec
(vec []float64)
cvx/misc.go:38
↓ 6 callers
Function
unblkQRBlockReflector
* * like LAPACK/dlafrt.f * * Build block reflector T from HH reflector stored in TriLU(A) and coefficients * in tau. * * Q = I - Y*T*Y.T; Househ
matops/qrwy.go:28
↓ 6 callers
Function
updateWithQT
compute: Q.T*C = (I -Y*T*Y.T).T*C == C - Y*(C.T*Y*T).T or Q*C = (I -Y*T*Y.T)*C == C - Y*(C.T*Y*T.T).T where C = /C1\ Y = /Y1\ \C2/ \Y
matops/qrwy.go:265
↓ 5 callers
Method
AmISame
(r Expr)
go-symexpr/compare.go:39
↓ 5 callers
Method
Apply
Compute A = fn(A) by applying function fn element wise to A. If indexes array is non-empty function is applied to elements of A indexed by the content
matrix/cdense_math.go:232
↓ 5 callers
Method
Arrays
* Returns an array of slices referencing the matrix data. Changes to the slices effect changes to the matrix. */
go.matrix/dense.go:26
↓ 5 callers
Function
BitLenUint64
BitLenUint64 returns the bit width of the non zero part of n.
mathutil/bits.go:85
↓ 5 callers
Method
BoundingBox
BoundingBox finds minimum and maximum coordinates of points in a contour.
polyclip-go/geom.go:82
↓ 5 callers
Method
Contains
Checks if a point is inside a contour using the "point in polygon" raycast method. This works for all polygons, whether they are clockwise or counter
polyclip-go/geom.go:119
↓ 5 callers
Function
DecomposeQR
* * Compute QR factorization of a M-by-N matrix A: A = Q * R. * * Arguments: * A On entry, the M-by-N matrix A. On exit, the elements on and ab
matops/qrwy.go:470
↓ 5 callers
Method
Encode
(v interface{})
cartconvert/cartconvserv/cartconvserv.go:48
↓ 5 callers
Method
ExpandToContainRect
(q Rect)
geom/rect.go:80
↓ 5 callers
Method
F1
Returns a tuple (f, Df) where f is of size (mnl, 1) containing f(x) Df is matrix of size (mnl, n) containing the derivatives of f at x: Df[k,:] is the
cvx/cp.go:119
↓ 5 callers
Function
FloatParse
(s string)
matrix/dense_string.go:85
↓ 5 callers
Method
IsEmpty
()
evaler/stack/stack.go:51
↓ 5 callers
Method
L
* Get a copy of this matrix with 0s above the diagonal. */
go.matrix/dense.go:129
↓ 5 callers
Method
Less
(int, int)
stat/types.go:87
↓ 5 callers
Function
Mod
Mod sets mod to n % Mexp and returns mod. It panics for exp == 0 || exp >= math.MaxInt32 || n < 0.
mathutil/mersenne/mersenne.go:186
↓ 5 callers
Function
ModPowBigInt
ModPowBigInt computes (b^e)%m. Returns nil for e < 0. It panics for m == 0 || b == e == 0.
mathutil/mathutil.go:323
↓ 5 callers
Function
MultQ
* * Multiply and replace C with Q*C or Q.T*C where Q is a real orthogonal matrix * defined as the product of k elementary reflectors. * * Q = H
matops/qrwym.go:567
↓ 5 callers
Function
MultQT
* * Multiply and replace C with Q*C or Q.T*C where Q is a real orthogonal matrix * defined as the product of k elementary reflectors and block refle
matops/qrwym.go:639
↓ 5 callers
Function
New
(x float64)
fixed/fixed.go:27
↓ 5 callers
Function
NewCos
(e Expr)
go-symexpr/types.go:162
↓ 5 callers
Function
NewEllipsoid
HELMERT Transformation - http://en.wikipedia.org/wiki/Helmert_transformation Returns a new ellipsoid by the given major axis a and major axis b in met
cartconvert/cartconvert/cartconvert.go:993
↓ 5 callers
Function
NewFrom
Create a Vector from a slice. Its dimension is equal to len(slice).
vector/vector.go:40
↓ 5 callers
Function
ParseBigBytes
ParseBigBytes parses a string representation of bytes into the number of bytes it represents. See also: BigBytes, BigIBytes. ParseBigBytes("42MB") -
go-humanize/bigbytes.go:139
↓ 5 callers
Function
ParseBytes
ParseBytes parses a string representation of bytes into the number of bytes it represents. See Also: Bytes, IBytes. ParseBytes("42MB") -> 42000000,
go-humanize/bytes.go:110
↓ 5 callers
Function
PopCountUint32
PopCountUint32 returns population count of n (number of bits set in n).
mathutil/bits.go:161
↓ 5 callers
Function
PopCountUint64
PopCountUint64 returns population count of n (number of bits set in n).
mathutil/bits.go:194
↓ 5 callers
Method
SetFrom
(g FloatGenerator, indexes ...int)
matrix/dense.go:524
← previous
next →
301–400 of 3,549, ranked by callers