CrossClj

0.0.3 docs

SourceDocs



RECENT
    VARS
    above
    cols
    complex-mag
    constant
    diag
    diff
    dot
    eig
    eye
    from-dense
    from-sparse
    get
    get*
    gets
    gets*
    iterate-indexed
    map
    map-indexed
    mapdat
    norm
    normalize
    nth-col
    nth-row
    observations
    permute
    permute-cols
    permute-rows
    pow
    prod
    rand
    rank
    rows
    scale
    set
    size
    slurp
    solve
    spit
    sum
    svd
    t
    then
    to-radial
    to-sparse
    trace
    zeros

    « Index of all namespaces of this project

    (above A)(above A B)(above A B & more)
    Attaches B to the bottom of A.
    
    (cols m)
    Explodes a matrix into cols.
    
    Private
    (complex-mag z)
    (constant n v)(constant n m v)
    Creates a constant SimpleMatrix
    
    (diag m)
    Either extracts a diagonal or builds a diagonal matrix.
    
    (diff a)(diff a b)
    Computes the elementwise matrix difference of two (or more)
    SimpleMatrix objects. If both are vectors, then they will be
    automatically transposed as necessary so as to match the shape of
    the first one
    (dot X Y)
    Returns the dot product, also generalized to matrices S_ij X_ij Y_ij
    
    (eig m)
    Returns a mapping of [:vecs :vals :quality] representing an
    Eigendecomposition of the matrix A. Values are returned in
    increasing order and are represented as [magnitude angle] pairs.
    (eye n)
    Creates the identity matrix
    
    (from-dense n m data)
    Creates a matrix from a dense representer in row-major order.
    
    (from-sparse data)(from-sparse n m data)
    Creates a matrix from a sparse representer of the form [[i j x]].
    
    (get m i)(get m i j)
    Extracts a particular value from the matrix at pair index (i, j) or
    linear index i.
    macro
    (get* m i j)
    Universal extractor: use :_ to indicate a wildcard on a particular dimension.
    
    (gets m)
    Get the elements of m as a sequence in row-major order.
    
    macro
    (gets* m i j)
    Universal lazy-seq extractor: use :_ to indicate a wildcard on a
    particular dimension.
    (iterate-indexed M)
    Gets all elements in row-major order in sparse format [i j v].
    
    (map f M)
    Maps over a matrix as a functor over the data
    
    (map-indexed f M)
    Maps over a matrix as a functor over the data AND their indices.
    
    macro
    (mapdat [var data] & body)
    Creates lazy looping context binding var to each row of data.
    
    (norm x)
    Returns the norm of the SimpleMatrix x. If it's a vector this is
    the Euclidean norm. If a matrix, the Frobenius norm.
    (normalize X)
    Scale the matrix or vector so that it's norm is 1.
    
    (nth-col m n)
    (nth-row m n)
    macro
    (observations data)
    Explodes the matrix into observations.
    
    (permute X indices)
    Performs the permutation P X Pt
    
    (permute-cols X indices)
    Performs the row permutation.
    
    (permute-rows X indices)
    Performs the row permutation.
    
    (pow A)(pow A n & {:keys [eig?]})
    Computes the matrix power A^n for the square matrix A. If n is not
    a positive integer OR if the :eig? flag is passed then this is
    computed via an eigendecomposition. Otherwise it's done by iterated
    products.
    (prod A)(prod A B)(prod A B & more)
    Computes the matrix product between a series of matrices.
    
    (rand n & [m min max])
    Creates a randomized matrix
    
    (rank A)
    Computes the approximate rank of A via SVD.
    
    (rows m)
    Explodes a matrix into rows.
    
    (scale s A)
    Applies A <- s A for s in R
    
    (set m i j v)
    (slurp f)
    Slurps up a saved matrix file.
    
    (solve A)(solve A b)
    Solves a matrix equation Ax = b. If b is not specified then it
    simply returns the inverse of A.
    (spit f matrix)
    Spits a matrix to a file.
    
    (sum a)(sum a b & more)(sum a b)
    Computes the sum of two (or more) SimpleMatrix objects. If they're
    both vectors, they will be automatically transposed if necessary so
    as to match the shape of the first one
    (t x)
    Transpose.
    
    (then A)(then A B)(then A B & more)
    Attaches B to the right of A.
    
    Private
    (to-radial z)
    Convert an imaginary number to the sequence [magnitude
    angle-in-radians]..
    (to-sparse M)(to-sparse M thresh)
    Creates a sparse, Clojure vec representation of a matrix such that
    values less than or equal to thresh (default 0) are elided.
    
    (comp from-sparse to-sparse) is a matrix identity and (comp
    to-sparse from-sparse) is a set identity since the output of
    to-sparse is guaranteed to be row-major order.
    (trace A)
    Computes the matrix trace, prod_i A_ii.
    
    (zeros n & [m])
    Creates a zero'd SimpleMatrix