Documentation

CompPoly.LinearAlgebra.Dense.Basic

Dense Row-Major Matrices #

Basic dense row-major matrix storage, indexing, and homogeneous-system predicates.

def CompPoly.DenseMatrix.setD {alpha : Type u_1} (xs : Array alpha) (i : ) (a : alpha) :
Array alpha

Set an array entry when the index is in bounds; otherwise leave the array unchanged.

Instances For
    structure CompPoly.DenseMatrix (F : Type u_1) [Zero F] :
    Type u_1

    A dense row-major matrix with dimensions stored explicitly.

    Instances For

      A dense matrix stores exactly one row-major entry for every matrix coordinate.

      Instances For
        def CompPoly.DenseMatrix.index {F : Type u_1} [Zero F] (M : DenseMatrix F) (row col : ) :

        Row-major index for the matrix entry (row, col).

        Instances For
          def CompPoly.DenseMatrix.get {F : Type u_1} [Zero F] (M : DenseMatrix F) (row col : ) :
          F

          Read a matrix entry, returning zero outside the stored data.

          Instances For
            def CompPoly.DenseMatrix.set {F : Type u_1} [Zero F] (M : DenseMatrix F) (row col : ) (value : F) :

            Replace a matrix entry when the row-major slot is stored.

            Instances For
              def CompPoly.DenseMatrix.ofFn {F : Type u_1} [Zero F] (rows cols : ) (f : F) :

              Construct a dense matrix from an entry function.

              Instances For
                def CompPoly.DenseMatrix.dotRow {F : Type u_1} [Semiring F] (M : DenseMatrix F) (row : ) (v : Array F) :
                F

                Dot product of one matrix row with a vector.

                Instances For
                  def CompPoly.DenseMatrix.mulVec {F : Type u_1} [Semiring F] (M : DenseMatrix F) (v : Array F) :

                  Matrix-vector product.

                  Instances For
                    def CompPoly.DenseMatrix.VectorWidth {F : Type u_1} [Zero F] (M : DenseMatrix F) (v : Array F) :

                    A vector has the same width as the matrix column count.

                    Instances For

                      A vector has at least one nonzero entry.

                      Instances For

                        A vector solves the homogeneous system represented by M.

                        Instances For