anchor.diff:  zeros(Dimensions) ->
       ?NOT_LOADED.
   
  -%% @doc Multiply two matrices.
  --spec multiply(matrix(), matrix()) -> matrix().
  +%% @doc Column of a matrix.
  +-spec col(matrix(), pos_integer()) -> matrix().
  +col(M0, I) ->
  +    ?NOT_LOADED.
  +
  +%% @doc Row of a matrix.
  +-spec row(matrix(), pos_integer()) -> matrix().
  +row(M0, I) ->
  +    ?NOT_LOADED.
  +
  +%% @doc Cell value.
  +-spec cell(matrix(), index()) -> number().
  +cell(M0, I) ->
  +    ?NOT_LOADED.
  +
  +%% @doc Add. Performs a scalar or matrix addition.
  +-spec add(matrix(), number() | matrix()) -> matrix().
  +add(M0, M1) ->
  +    ?NOT_LOADED.
  +
  +%% @doc Multiply. Performs a scalar or matrix multiply.
  +-spec multiply(matrix(), number() | matrix()) -> matrix().
   multiply(M0, M1) ->
       ?NOT_LOADED.
   
   %% @doc Transpose a matrix.
   -spec transpose(matrix()) -> matrix().
   transpose(M0) ->
  +    ?NOT_LOADED.
  +
  +%% @doc Invert a matrix.
  +-spec invert(matrix()) -> matrix() | {error, not_invertable}.
  +invert(M0) ->
       ?NOT_LOADED.
   
   %% @doc Convert a matrix to a tuple of tuples.
  
positive.code:     | list(list(number()))
      | list(list(list(number()))).
  
  -export_type([dimensions/0, matrix/0, tuple_matrix/0, list_matrix/0]).
  
  -define(NOT_LOADED, not_loaded(?LINE)).
  
  -export([identity/1, ones/1, zeros/1, multiply/2,
      transpose/1]).
  
  -on_load(init/0).
  
  %% api
  
  %% @doc Create an identity matrix.
  -spec identity(dimensions()) -> matrix().
  
negative.code: %% @author Tom Burdick <thomas.burdick@gmail.com>
  %% @copyright 2011 Tom Burdick
  %% @doc Numerical erlang.
  
  -module(matrix).
  
  -type type() :: int8 | int16 | int32 | int64 | real32
      | real64 | complex32 | complex64.
  -type dimensions() :: pos_integer() | tuple(pos_integer()).
  -type index() :: pos_integer() | tuple(pos_integer()).
  -type matrix() :: {matrix, type(), dimensions(), binary()}.
  -type tuple_matrix() :: tuple(number())
      | tuple(tuple(number()))
      | tuple(tuple(tuple(number()))).
  