Overview   Project   Class   Tree   Deprecated   Index 
GraphGo 0.5
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

binarymath
Class CBMatrix

   in bmatrix.h
   in bmatrix.cpp

class CBMatrix


Constructor Summary
CBMatrix( int n, int m )
          Constructor for CBMatrix class.
 
Method Summary
 int abs( void )
          Count elements that values are 1 in binary matrix
 CBMatrix and( CBMatrix bm2 )
          Logical and with binary matrix object bm2
 void clear( void )
          Clear binary matrix
 CBMatrix diff( CBMatrix bm2 )
          Logical difference with binary matrix object bm2
 bool equals( CBMatrix bm2 )
          Returns true if two matrixes are equal.
 int getValue( int i, int j )
          Get value of element i, j in binary matrix object
 CBMatrix inv( void )
          Returns inverted binary matrix
 CBMatrix mul( CBMatrix bm2 )
          Product with binary matrix object bm2
 CBVector mul( CBVector bv2 )
          Product with binary vector object bv2
 void operator=( CBMatrix& bm )
          Copy operator for binary matrix
 CBMatrix or( CBMatrix bm2 )
          Logical or with binary matrix object bm2
 CBVector row( int i )
          Returns transposed binary vector
 void setValue( int i, int j, int value )
          Set value 0 or 1 to element i, j of binary matrix object
 string to_string( void )
          Logical difference with binary matrix object bm2
 CBMatrix tran( void )
          Returns transposed binary matrix
 CBVector tran1( void )
          Returns transposed binary vector
 CBMatrix xor( CBMatrix bm2 )
          Logical xor with binary matrix object bm2
 

Constructor Detail

CBMatrix

public CBMatrix( int n, int m );
Constructor for CBMatrix class.
Parameters:
n - number of rows of the matrix
m - number of columns of the matrix
Since:
0.1


Method Detail

abs

public int abs( void );
Count elements that values are 1 in binary matrix
Returns:
number of 1 elements
Since:
0.1

and

public CBMatrix and( CBMatrix bm2 );
Logical and with binary matrix object bm2
Parameters:
bm2 - second operand for logical and
Returns:
logical and with bm2 (or 0 if error)
Since:
0.1

clear

public void clear( void );
Clear binary matrix
Since:
0.1

diff

public CBMatrix diff( CBMatrix bm2 );
Logical difference with binary matrix object bm2
Parameters:
bm2 - second operand for logical difference
Returns:
logical difference with bm2 (or 0 if error)
Since:
0.1

equals

public bool equals( CBMatrix bm2 );
Returns true if two matrixes are equal. Returns false if error or different.
Parameters:
bm2 - comparison target binary matrix
Returns:
returns true if two matrixes are equal
Since:
0.1

getValue

public int getValue( int i, int j );
Get value of element i, j in binary matrix object
Parameters:
i - element row number (1 origin)
j - element column number (1 origin)
Returns:
got value
Since:
0.1

inv

public CBMatrix inv( void );
Returns inverted binary matrix
Returns:
inverted binary matrix
Since:
0.1

mul

public CBMatrix mul( CBMatrix bm2 );
Product with binary matrix object bm2
Parameters:
bm2 - second operand for product
Returns:
product with bm2 (or 0 if error)
Since:
0.1

mul

public CBVector mul( CBVector bv2 );
Product with binary vector object bv2
Parameters:
bv2 - second operand for product
Returns:
product with bv2 (or 0 if error)
Since:
0.1

operator=

public void operator=( CBMatrix& bm );
Copy operator for binary matrix
Parameters:
bm - source bianary matrix
Since:
0.2

or

public CBMatrix or( CBMatrix bm2 );
Logical or with binary matrix object bm2
Parameters:
bm2 - second operand for logical or
Returns:
logical or with bm2 (or 0 if error)
Since:
0.1

row

public CBVector row( int i );
Returns transposed binary vector
Returns:
transposed binary vector
Since:
0.1

setValue

public void setValue( int i, int j, int value );
Set value 0 or 1 to element i, j of binary matrix object
Parameters:
i - element row number (1 origin)
j - element column number (1 origin)
value - value to set
Since:
0.1

to_string

public string to_string( void );
Logical difference with binary matrix object bm2
Parameters:
bm2 - second operand for logical difference
Returns:
logical difference with bm2 (or 0 if error)
Since:
0.1

tran

public CBMatrix tran( void );
Returns transposed binary matrix
Parameters:
binary - matrix
Returns:
transposed binary matrix
Since:
0.1

tran1

public CBVector tran1( void );
Returns transposed binary vector
Returns:
transposed binary vector
Since:
0.1

xor

public CBMatrix xor( CBMatrix bm2 );
Logical xor with binary matrix object bm2
Parameters:
bm2 - second operand for logical xor
Returns:
logical xor with bm2 (or 0 if error)
Since:
0.1

 Overview   Project   Class   Tree   Deprecated   Index 
GraphGo 0.5
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD