Sha256: 7cba11ac652c4a5842a49fb10166549db50aad06deeeda0ed9830ccc6761e6bc
Contents?: true
Size: 1.19 KB
Versions: 170
Compression:
Stored size: 1.19 KB
Contents
defmodule Matrix do defstruct matrix: nil @doc """ Convert an `input` string, with rows separated by newlines and values separated by single spaces, into a `Matrix` struct. """ @spec from_string(input :: String.t()) :: %Matrix{} def from_string(input) do end @doc """ Write the `matrix` out as a string, with rows separated by newlines and values separated by single spaces. """ @spec to_string(matrix :: %Matrix{}) :: String.t() def to_string(matrix) do end @doc """ Given a `matrix`, return its rows as a list of lists of integers. """ @spec rows(matrix :: %Matrix{}) :: list(list(integer)) def rows(matrix) do end @doc """ Given a `matrix` and `index`, return the row at `index`. """ @spec row(matrix :: %Matrix{}, index :: integer) :: list(integer) def row(matrix, index) do end @doc """ Given a `matrix`, return its columns as a list of lists of integers. """ @spec columns(matrix :: %Matrix{}) :: list(list(integer)) def columns(matrix) do end @doc """ Given a `matrix` and `index`, return the column at `index`. """ @spec column(matrix :: %Matrix{}, index :: integer) :: list(integer) def column(matrix, index) do end end
Version data entries
170 entries across 170 versions & 1 rubygems