bandicoot
Bandicoot
C++ library for GPU accelerated linear algebra
[top] API Documentation for Bandicoot 1.13.0


Preamble

 


Overview
Matrix and Vector Classes
Member Functions & Variables
Generated Vectors / Matrices
Functions of Vectors / Matrices
Decompositions, Factorisations, and Inverses
Signal & Image Processing
Statistics
Miscellaneous




Matrix and Vector Classes



Mat<type>
fmat
mat


Col<type>
fvec
vec


Row<type>
frowvec
rowvec


operators:  +    *  %  /  ==  !=  <=  >=  <  >  &&  ||




Member Functions & Variables



attributes


element access via (), [] and .at()


.zeros()
  (member function of Mat, Col, and Row)
.zeros( n_elem )
  (member function of Col and Row)
.zeros( n_rows, n_cols )
  (member function of Mat)


.ones()
  (member function of Mat, Col, and Row)
.ones( n_elem )
  (member function of Col and Row)
.ones( n_rows, n_cols )
  (member function of Mat)


.eye()
.eye( n_rows, n_cols )


.randu()
  (member function of Mat, Col, and Row)
.randu( n_elem )
  (member function of Col and Row)
.randu( n_rows, n_cols )
  (member function of Mat)

.randn()
  (member function of Mat, Col, and Row)
.randn( n_elem )
  (member function of Col and Row)
.randn( n_rows, n_cols )
  (member function of Mat)


.fill( value )


.clamp( min_value, max_value )


.set_size( n_elem )
  (member function of Col and Row)
.set_size( n_rows, n_cols )
  (member function of Mat)
.set_size( size(X) )
  (member function of Mat, Col, and Row)


.reshape( n_rows, n_cols )
  (member function of Mat)
.reshape( size(X) )
  (member function of Mat)


.resize( n_elem )
  (member function of Col and Row)
.resize( n_rows, n_cols )
  (member function of Mat)
.resize( size(X) )
  (member function of Mat, Col, and Row)


.reset()


submatrix views


.get_dev_mem()
.get_dev_mem( synchronise )


compatibility container functions


.diag()
.diag( k )


.t()
.st()


.eval()


.is_empty()


.is_vec()
.is_colvec()
.is_rowvec()


.is_square()


.print()
.print( header )

.print( stream )
.print( stream, header )


.raw_print()
.raw_print( header )

.raw_print( stream )
.raw_print( stream, header )




Generated Vectors / Matrices



linspace( start, end )
linspace( start, end, N )


eye( n_rows, n_cols )
eye( size(X) )


ones( n_elem )
ones( n_rows, n_cols )
ones( size(X) )


zeros( n_elem )
zeros( n_rows, n_cols )
zeros( size(X) )


randu( n_elem )
randu( n_rows, n_cols )
randu( size(X) )


randn( n_elem )
randn( n_elem, distr_param(mu,sd) )

randn( n_rows, n_cols )
randn( n_rows, n_cols, distr_param(mu,sd) )

randn( size(X) )
randn( size(X), distr_param(mu,sd) )


randi( n_elem )
randi( n_elem, distr_param(a,b) )

randi( n_rows, n_cols )
randi( n_rows, n_cols, distr_param(a,b) )

randi( size(X) )
randi( size(X), distr_param(a,b) )




Functions of Vectors / Matrices



abs( X )


accu( X )


all( V )
all( X )
all( X, dim )


any( V )
any( X )
any( X, dim )


approx_equal( A, B, method, tol )
approx_equal( A, B, method, abs_tol, rel_tol )


as_scalar( expression )


clamp( X, min_val, max_val )


conv_to< type >::from( X )


cross( A, B )


val = det( A )   (form 1)
det( val, A )   (form 2)


diagmat( V )
diagmat( V, k )

diagmat( X )
diagmat( X, k )


diagvec( X )
diagvec( X, k )


dot( A, B )


find( X )
find( X, k )
find( X, k, s )


find_finite( X )


find_nonfinite( X )


find_nan( X )


join_rows( A, B )
join_rows( A, B, C )
join_rows( A, B, C, D )
 
join_cols( A, B )
join_cols( A, B, C )
join_cols( A, B, C, D )
       join_horiz( A, B )
join_horiz( A, B, C )
join_horiz( A, B, C, D )
 
join_vert( A, B )
join_vert( A, B, C )
join_vert( A, B, C, D )


min( V )
min( M )
min( M, dim )
min( Q )
min( Q, dim )
min( A, B )
       max( V )
max( M )
max( M, dim )
max( Q )
max( Q, dim )
max( A, B )


norm( X )
norm( X, p )


normalise( V )
normalise( V, p )

normalise( X )
normalise( X, p )
normalise( X, p, dim )


pow( A, scalar )   


repmat( A, num_copies_per_row, num_copies_per_col )


reshape( X, n_rows, n_cols )
reshape( X, size(Y) )


resize( X, n_rows, n_cols )
resize( X, size(Y) )


size( X )
size( n_rows, n_cols )


sort( V )
sort( V, sort_direction )

sort( X )
sort( X, sort_direction )
sort( X, sort_direction, dim )


sort_index( X )
sort_index( X, sort_direction )

stable_sort_index( X )
stable_sort_index( X, sort_direction )


sum( V )
sum( M )
sum( M, dim )


symmatu( A )
symmatl( A )


trace( X )


trans( A )


vectorise( X )
vectorise( X, dim )


miscellaneous element-wise functions:


trigonometric element-wise functions (cos, sin, tan, ...)




Decompositions, Factorisations, and Inverses



R = chol( X)   
chol(R, X)   


vec eigval = eig_sym( X )

eig_sym( eigval, X )

eig_sym( eigval, eigvec, X )


lu( L, U, P, X )
lu( L, U, X )


B = pinv( A )
B = pinv( A, tolerance )

pinv( B, A )
pinv( B, A, tolerance )


X = solve( A, B )

solve( X, A, B )


s = svd( X )

svd( s, X )

svd( U, s, V, X )




Signal & Image Processing



conv( A, B )
conv( A, B, shape )


conv2( A, B )
conv2( A, B, shape )




Statistics



mean, median, stddev, var, range


cov( X, Y )
cov( X, Y, norm_type )

cov( X )
cov( X, norm_type )


cor( X, Y )
cor( X, Y, norm_type )

cor( X )
cor( X, norm_type )




Miscellaneous



backend configuration


constants (pi, inf, eps, ...)


wall_clock


output streams


uword, sword


Examples of Matlab/Octave syntax and conceptually corresponding Bandicoot syntax




Armadillo/Bandicoot adaptation guide


example program



config.hpp


direct linking


kernel cache


History of API Additions, Changes and Deprecations



sourceforge