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

BVector
Class CBVector

   in BVector.h
   in BVector.cpp

class CBVector


Constructor Summary
CBVector( int order, int value[] )
          
CBVector( int order )
          
 
Method Summary
 int abs()
          Count elements that values are 1 in binary vector
 int abs( void )
          
 CBVector and( CBVector bv2 )
          Logical and with binary vector object bv2
 void clear( void )
          
 void clear()
          Clear binary vector
 CBVector diff( CBVector bv2 )
          Logical difference with binary vector object bv2
 int dot( CBVector bv2 )
          Dot product with binary vector object bv2
 bool equals( CBVector bv2 )
          Returns true if two vectors are equal.
 int getValue( int i )
          Method to get element i of binary vector
 CBVector inv( void )
          
 CBVector inv()
          Returns inverted binary vector
 CBVector mul( int b2 )
          Product with scalar (0 or 1)
 void operator=( CBVector& bv )
          Copy operator for binary vectors
 CBVector or( CBVector bv2 )
          Logical or with binary vector object bv2
 void setValue( int i, int value )
          Method to set value 0 or 1 to element i of binary vector object
 string toString()
          Convert binary vector object to string
 string toString( void )
          
 CBVector xor( CBVector bv2 )
          Exclusive or with binary vector object bv2
 

Constructor Detail

CBVector

public CBVector( int order, int value[] );

CBVector

public CBVector( int order );


Method Detail

abs

 int abs();
Count elements that values are 1 in binary vector
Returns:
{int} number of 1 elements
Since:
0.1

abs

public int abs( void );

and

public CBVector and( CBVector bv2 );
Logical and with binary vector object bv2
Parameters:
{BVector} - bv2 second operand for logical and
Returns:
{BVector} logical and with bv2 (or 0 if error)
Since:
0.1

clear

public void clear( void );

clear

 void clear();
Clear binary vector
Since:
0.1

diff

public CBVector diff( CBVector bv2 );
Logical difference with binary vector object bv2
Parameters:
{CBVector} - bv2 second operand for logical difference
Returns:
{CBVector} logical difference with bv2 (or 0 if error)
Since:
0.1

dot

public int dot( CBVector bv2 );
Dot product with binary vector object bv2
Parameters:
{CBVector} - bv2 second operand for dot product
Returns:
{int} dot product with bv2 (or -1 if error)
Since:
0.1

equals

public bool equals( CBVector bv2 );
Returns true if two vectors are equal. Returns false if error or different.
Parameters:
bv2 - comparison target binary vector
Returns:
{bool} returns true if two vectors are equal
Since:
0.1

getValue

public int getValue( int i );
Method to get element i of binary vector
Parameters:
{int} - i element number
Returns:
{int} value
Since:
0.1

inv

public CBVector inv( void );

inv

 CBVector inv();
Returns inverted binary vector
Returns:
{CBVector} inverted binary vector
Since:
0.1

mul

public CBVector mul( int b2 );
Product with scalar (0 or 1)
Parameters:
{int} - b2 second operand for product
Returns:
{CBVector} product with b2 (or 0 if error)
Since:
0.1

operator=

public void operator=( CBVector& bv );
Copy operator for binary vectors
Parameters:
{CBVector - &} bv source bianary vector
Since:
0.1

or

public CBVector or( CBVector bv2 );
Logical or with binary vector object bv2
Parameters:
{CBVector} - bv2 second operand for logical or
Returns:
{CBVector} logical or with bv2 (or 0 if error)
Since:
0.1

setValue

public void setValue( int i, int value );
Method to set value 0 or 1 to element i of binary vector object
Parameters:
{int} - i element number
{int} - value value to set
Since:
0.1

toString

 string toString();
Convert binary vector object to string
Returns:
{string} string e.g. "(0,1,...,1)"
Since:
0.1

toString

public string toString( void );

xor

public CBVector xor( CBVector bv2 );
Exclusive or with binary vector object bv2
Parameters:
{CBVector} - bv2 second operand for exclusive or
Returns:
{CBVector} exclusive or with bv2 (or 0 if error)
Since:
0.1

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