KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Functions
l_int_matrix.h File Reference

Definition for the Int_matrix class, a thin wrapper on the KJB Int_matrix struct and its related functionality. More...

#include "l/l_int_matrix.h"
#include "l/l_int_mat_io.h"
#include "l_cpp/l_exception.h"
#include "l_cpp/l_int_vector.h"
#include <vector>
#include <ostream>

Go to the source code of this file.

Classes

class  kjb::Int_matrix
 This class implements matrices, in the linear-algebra sense, restricted to integer-valued elements. More...
 

Namespaces

 kjb
 Classes and functions for dealing with trajectory files.
 

Functions

Int_matrix kjb::create_identity_int_matrix (int rank)
 Construct an identity matrix of specified rank. More...
 
Int_matrix kjb::create_zero_int_matrix (int rows, int columns)
 Construct a zero matrix of specified size. More...
 
Int_matrix kjb::create_zero_int_matrix (int rows)
 Construct a square zero matrix of specified size. More...
 
Int_matrix kjb::create_diagonal_matrix (const Int_matrix::Vec_type &diagnoal)
 Construct a one-row matrix by deep-copying a vector. More...
 
Int_matrix kjb::create_row_matrix (const Int_matrix::Vec_type &)
 Construct a one-row matrix by deep-copying a vector. More...
 
Int_matrix kjb::create_column_matrix (const Int_matrix::Vec_type &)
 Construct a one-column matrix by deep-copying a vector. More...
 
Int_matrix kjb::operator* (const Int_matrix &op1, const Int_matrix &op2)
 Compute product of this matrix (on the left) and another. More...
 
Int_matrix kjb::operator* (const Int_matrix &op1, Int_matrix::Value_type op2)
 Compute the product of this matrix and a scalar, yielding a new matrix. More...
 
Int_matrix kjb::operator* (Int_matrix::Value_type op1, const Int_matrix &op2)
 Compute product of scalar and matrix, returning a new matrix. More...
 
Int_matrix kjb::operator/ (const Int_matrix &op1, Int_matrix::Value_type op2)
 Compute new matrix equal to lefthand matrix with each entry divided by a scalar value. More...
 
Int_matrix kjb::operator+ (const Int_matrix &op1, const Int_matrix &op2)
 Compute matrix addition, returning a new matrix. More...
 
Int_matrix kjb::operator- (const Int_matrix &op1, const Int_matrix &op2)
 Compute matrix difference, returning a new matrix. More...
 
Int_matrix kjb::operator- (const Int_matrix &op1)
 Return the additive inverse of this matrix. More...
 
bool kjb::operator== (const Int_matrix &op1, const Int_matrix::Impl_type &op2)
 Test for exact equality between two matrices. More...
 
bool kjb::operator== (const Int_matrix &op1, const Int_matrix &op2)
 Test for exact equality between two matrices. More...
 
bool kjb::operator!= (const Int_matrix &op1, const Int_matrix::Impl_type &op2)
 Test for any difference between two matrices. More...
 
bool kjb::operator!= (const Int_matrix &op1, const Int_matrix &op2)
 Test for any difference between two matrices. More...
 
bool kjb::operator== (const Int_matrix::Impl_type &op1, const Int_matrix &op2)
 Test for exact equality between two matrices. More...
 
bool kjb::operator!= (const Int_matrix::Impl_type &op1, const Int_matrix &op2)
 Test for any difference between two matrices. More...
 
Int_matrix kjb::matrix_transpose (const Int_matrix &op1)
 Test for any difference between two matrices. More...
 
Int_matrix kjb::abs (const Int_matrix &mat)
 Compute the elementwise absolute value of a matrix. More...
 
Int_matrix::Value_type kjb::max_abs_difference (const Int_matrix &op1, const Int_matrix &op2)
 Find the largest difference between two matrices. More...
 
Int_matrix::Value_type kjb::min (const Int_matrix &mat)
 Return the minimum value in this matrix. More...
 
Int_matrix::Value_type kjb::max (const Int_matrix &mat)
 Return the maximum value in this matrix. More...
 
std::ostream & kjb::operator<< (std::ostream &out, const Int_matrix &m)
 Display matrix contents in an ASCII format. More...
 

Detailed Description

Definition for the Int_matrix class, a thin wrapper on the KJB Int_matrix struct and its related functionality.

Author
Luca Del Pero
Andrew Predoehl
Ernesto Brau

If you make changes to this file, PLEASE CONSIDER making parallel changes to m_matrix.h, whose structure closely parallels the structure of this file. Tip: use vimdiff on both files to show the parallel structure.

Although this class has much the same interface as class Matrix, they are not derived from a common abstract interface, because (1) we want as much speed as possible – this code should be eligible to put inside a tight inner loop; and (2) I don't know whether that would be useful.