ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
numeric Directory Reference

Files

 
BigInteger.h
 The integers of any length of Knuth (4.3.1): a sign and the magnitude as a vector of digits (limbs) in base \( b = 2^{64} \), the least significant first, with no leading zero, the first two in place in the number, so that the numbers of one or two digits are made with no allocation, and the longer ones in a block of the heap that grows by doubling (detail::Limbs).
 
BinaryInteger.h
 The arithmetic on integers of \( n \) bits, vectors of bits from the least significant one, of section 2.6:
 
Catalan.h
 The numbers of Catalan, 1, 1, 2, 5, 14, 42, and so on: \( C_n \) counts the binary trees of \( n \) nodes (so the binary search trees on \( n \) keys, the trees whose symmetric visit is \( 1 , \ldots , n \)), the strings of \( n \) pairs of balanced parentheses, the full binary trees of \( n + 1 \) leaves (the parenthesizations of a product of \( n + 1 \) factors), the triangulations of a convex polygon of \( n + 2 \) sides, and the monotone lattice paths that never cross the diagonal.
 
Combinatorics.h
 The examples of the introduction and of section 13.4 of chapter 13:
 
CsrMatrix.h
 A sparse matrix in compressed sparse rows (CSR), beyond the book: the nonzeros of each row, by column, in one vector of values and one of columns, and the place where each row begins in a vector of \( m + 1 \) offsets, \( 12 \, \mathit{nnz} + 8 m \) bytes for doubles, read in order by the product with a vector instead of the walk of the orthogonal lists of SparseMatrix [see SparseMatrix.h], whose nodes are scattered.
 
DenseMatrix.h
 The dense matrices by rows, beyond the book: DenseMatrix keeps the \( m \times n \) entries by rows in one contiguous vector, instead of the vector of rows of Matrix.h [see Matrix.h], and the product, on a CBLAS when there is one, and the transposition run on it.
 
DynamicCsr.h
 A compressed sparse matrix that grows and shrinks by whole rows (or whole columns), beyond the book: the bundle of the cuts of a decomposition, whose rows come in batches and go away in batches, kept at all times in the arrays \( \mathit{beg} \), \( \mathit{ind} \) and \( \mathit{val} \) that the solvers of linear programs take, so that handing it over costs nothing.
 
Matrix.h
 The product of two square matrices \( n \times n \) (section 12.4):
 
MatrixChain.h
 The multiplication of a chain of matrices of section 13.3: \( A_i \) of size \( c[ i ] \times c[ i + 1 ] \), \( 0 \le i < n \), and the order of the products with the fewest scalar multiplications.
 
NumberTheory.h
 The arithmetic of section 17.2 and of exercises 17.1-17.3, on unsigned integers of 64 bits:
 
Polynomial.h
 The product of two polynomials of \( n \) coefficients each, the vectors \( p[ 0 .. n - 1 ] \) and \( q[ 0 .. n - 1 ] \) from the constant one, into the \( 2 n - 1 \) coefficients of \( r = p q \) (section 12.3):
 
RandomGenerators.h
 The engineered random numbers, beyond the book: generators of 64 bits that cost a few instructions and pass the statistical batteries (BigCrush of TestU01, PractRand), and the uses of a word that need no division.
 
RandomNumbers.h
 Random numbers as Knuth treats them (chapter 3 of The Art of Computer Programming), beyond the book:
 
RandomSampling.h
 The uniform sampling of \( n \) of \( N \) items, as chapter 3 (Random Sampling) of Ferragina's Pearls of Algorithm Engineering treats it, in the three settings there: the items on the disk with \( N \) known, a stream with \( N \) known, a stream with \( N \) unknown.
 
Rational.h
 The exact rational numbers of Knuth (section 4.5.1 of The Art of Computer Programming), beyond the book: a fraction \( u / u' \) of integers of any length [see BigInteger.h] kept in lowest terms, with \( u' > 0 \).
 
RSA.h
 The public key cryptosystem RSA of the reality check of section 17.3, on integers of 64 bits, a toy that shows the method and is not secure: the keys need some thousand bits.
 
SellMatrix.h
 A sparse matrix in the format SELL- \( C \)- \( \sigma \) of Kreutzer, Hager, Wellein, Fehske and Bishop, beyond the book: the rows, sorted by their number of nonzeros within windows of \( \sigma \) consecutive rows, go in chunks of \( C \) rows, and each chunk keeps its nonzeros by columns of the chunk, the \( k \)-th nonzero of its \( C \) rows side by side, padded with zeros to the longest of its rows.
 
SparseAssembly.h
 The assembly of a sparse matrix from its triplets, beyond the book: the entries \( ( i , j , v ) \) in any order, with repetitions, become the arrays of the compressed form that the solvers of linear programs take (\( \mathit{beg} \), \( \mathit{ind} \) and \( \mathit{val} \), by columns or by rows), written in the arrays of the caller, with no matrix object in between and no other allocation than a workspace that a caller may keep from one assembly to the next.
 
SparseMatrix.h
 A sparse matrix on orthogonal lists, beyond the book (section 2.2.6 of Knuth): each nonzero entry is a node on the circular list of its row, sorted by column, and on that of its column, sorted by row, each list with a head node; the space is \( O( m + n + \mathit{nnz} ) \) and an entry is found by walking its row.