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

BVector
Class CBVector

   in BVector.h
   in BVector.cpp

class CBVector


Constructor Summary
CBVector( int order, string name )
          Constructor for CBVector class.
CBVector( int order, int value[], string name )
          Constructor for CBVector class.
CBVector( void )
          Constructor for CBVector class.
~CBVector( void )
          Constructor for CBVector class.
 
Method Summary
 int abs( void )
          Count elements that values are 1 in binary vector
 CBVector and( CBVector bv2 )
          Logical and with binary vector object bv2
 void clear( void )
          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 getOrder( void )
          Get order of binary vector
 int getValue( int i )
          Get element i of binary vector
 CBVector inv( void )
          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
 static void releaseMem( void )
          Release memories for bits
 void setValue( int i, int value )
          Set value 0 or 1 to element i of binary vector object
 string toString( void )
          Convert binary vector object to string
 CBVector xor( CBVector bv2 )
          Exclusive or with binary vector object bv2
 

Constructor Detail

CBVector

public CBVector( int order, string name );
Constructor for CBVector class.
Parameters:
order - order of the vector
Since:
0.1

CBVector

public CBVector( int order, int value[], string name );
Constructor for CBVector class.
Parameters:
order - order of the vector
value[] - array of values
Since:
0.1

CBVector

public CBVector( void );
Constructor for CBVector class.
Since:
0.2

~CBVector

public ~CBVector( void );
Constructor for CBVector class.
Parameters:
order - order of the vector
value[] - array of values
Since:
0.1


Method Detail

abs

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

and

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

clear

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

diff

public CBVector diff( CBVector bv2 );
Logical difference with binary vector object bv2
Parameters:
bv2 - second operand for logical difference
Returns:
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:
bv2 - second operand for dot product
Returns:
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:
returns true if two vectors are equal
Since:
0.1

getOrder

public int getOrder( void );
Get order of binary vector
Returns:
order
Since:
0.2

getValue

public int getValue( int i );
Get element i of binary vector
Parameters:
i - element number (1 origin)
Returns:
value
Since:
0.2

inv

public CBVector inv( void );
Returns inverted binary vector
Returns:
inverted binary vector
Since:
0.1

mul

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

operator=

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

or

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

releaseMem

public static void releaseMem( void );
Release memories for bits
Since:
0.2

setValue

public void setValue( int i, int value );
Set value 0 or 1 to element i of binary vector object
Parameters:
i - element number (1 origin)
value - value to set
Since:
0.2

toString

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

xor

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

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