Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

ColPack::BipartiteGraphPartialColoring Class Reference
[Classes for Bipartite Graphs Partial Coloring]

class BipartiteGraphPartialColoring in group21. More...

#include <BipartiteGraphPartialColoring.h>

Inherits ColPack::BipartiteGraphPartialOrdering.

Inherited by ColPack::BipartiteGraphPartialColoringInterface.

Collaboration diagram for ColPack::BipartiteGraphPartialColoring:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void PrintPartialColors ()
 Based on m_s_VertexColoringVariant, either PrintRowPartialColors() or PrintColumnPartialColors() will be called.
void PrintPartialColoringMetrics ()
 Based on m_s_VertexColoringVariant, either PrintRowPartialColoringMetrics() or PrintColumnPartialColoringMetrics() will be called.
int CheckPartialDistanceTwoColoring ()
 Based on m_s_VertexColoringVariant, either PrintRowPartialColoringMetrics() or PrintColumnPartialColoringMetrics() will be called.
void GetVertexPartialColors (vector< int > &output)
 Based on m_s_VertexColoringVariant, either GetLeftVertexColors() or GetRightVertexColors() will be called.
double ** GetSeedMatrix (int *i_SeedRowCount, int *i_SeedColumnCount)
 Based on m_s_VertexColoringVariant, either GetLeftSeedMatrix() or GetRightSeedMatrix() will be called.
double ** GetSeedMatrix_unmanaged (int *i_SeedRowCount, int *i_SeedColumnCount)
 Based on m_s_VertexColoringVariant, either GetLeftSeedMatrix_unmanaged() or GetRightSeedMatrix_unmanaged() will be called.
double ** GetLeftSeedMatrix (int *i_SeedRowCount, int *i_SeedColumnCount)
 Generate and return the Left Seed matrix. This Seed matrix is managed and freed by ColPack.
double ** GetLeftSeedMatrix_unmanaged (int *i_SeedRowCount, int *i_SeedColumnCount)
 Same as GetLeftSeedMatrix(), except that this Seed matrix is NOT managed by ColPack.
double ** GetRightSeedMatrix (int *i_SeedRowCount, int *i_SeedColumnCount)
 Return the Right Seed matrix. This Seed matrix is managed and freed by ColPack.
double ** GetRightSeedMatrix_unmanaged (int *i_SeedRowCount, int *i_SeedColumnCount)
 Same as GetRightSeedMatrix(), except that this Seed matrix is NOT managed by ColPack.
 BipartiteGraphPartialColoring ()
 ~BipartiteGraphPartialColoring ()
virtual void Clear ()
virtual void Reset ()
int PartialDistanceTwoRowColoring ()
int PartialDistanceTwoColumnColoring ()
int CheckPartialDistanceTwoRowColoring ()
int CheckPartialDistanceTwoColumnColoring ()
int GetLeftVertexColorCount ()
int GetRightVertexColorCount ()
int GetVertexColorCount ()
string GetVertexColoringVariant ()
void GetLeftVertexColors (vector< int > &output)
void GetRightVertexColors (vector< int > &output)
void PrintRowPartialColors ()
void PrintColumnPartialColors ()
void PrintRowPartialColoringMetrics ()
void PrintColumnPartialColoringMetrics ()
void PrintVertexPartialColorClasses ()
double GetVertexColoringTime ()

Protected Member Functions

void Seed_init ()
void Seed_reset ()

Protected Attributes

int m_i_LeftVertexColorCount
int m_i_RightVertexColorCount
int m_i_VertexColorCount
int m_i_ViolationCount
int m_i_ColoringUnits
int m_i_LargestLeftVertexColorClass
int m_i_LargestRightVertexColorClass
int m_i_LargestLeftVertexColorClassSize
int m_i_LargestRightVertexColorClassSize
int m_i_SmallestLeftVertexColorClass
int m_i_SmallestRightVertexColorClass
int m_i_SmallestLeftVertexColorClassSize
int m_i_SmallestRightVertexColorClassSize
double m_d_AverageLeftVertexColorClassSize
double m_d_AverageRightVertexColorClassSize
double m_d_ColoringTime
double m_d_CheckingTime
string m_s_VertexColoringVariant
vector< int > m_vi_LeftVertexColors
vector< int > m_vi_RightVertexColors
vector< int > m_vi_LeftVertexColorFrequency
vector< int > m_vi_RightVertexColorFrequency
bool seed_available
int i_seed_rowCount
double ** dp2_Seed

Private Member Functions

int CalculateVertexColorClasses ()
int CheckVertexColoring (string s_VertexColoringVariant)

Detailed Description

class BipartiteGraphPartialColoring in group21.

To be completed.

Definition at line 33 of file BipartiteGraphPartialColoring.h.


Constructor & Destructor Documentation

ColPack::BipartiteGraphPartialColoring::BipartiteGraphPartialColoring (  ) 

Definition at line 163 of file BipartiteGraphPartialColoring.cpp.

References Clear(), and Seed_init().

Here is the call graph for this function:

ColPack::BipartiteGraphPartialColoring::~BipartiteGraphPartialColoring (  ) 

Definition at line 172 of file BipartiteGraphPartialColoring.cpp.

References Clear(), and Seed_reset().

Here is the call graph for this function:


Member Function Documentation

int ColPack::BipartiteGraphPartialColoring::CalculateVertexColorClasses (  )  [private]
int ColPack::BipartiteGraphPartialColoring::CheckPartialDistanceTwoColoring (  ) 

Based on m_s_VertexColoringVariant, either PrintRowPartialColoringMetrics() or PrintColumnPartialColoringMetrics() will be called.

Definition at line 854 of file BipartiteGraphPartialColoring.cpp.

References CheckPartialDistanceTwoColumnColoring(), CheckPartialDistanceTwoRowColoring(), and m_s_VertexColoringVariant.

Here is the call graph for this function:

int ColPack::BipartiteGraphPartialColoring::CheckPartialDistanceTwoColumnColoring (  ) 
int ColPack::BipartiteGraphPartialColoring::CheckPartialDistanceTwoRowColoring (  ) 
int ColPack::BipartiteGraphPartialColoring::CheckVertexColoring ( string  s_VertexColoringVariant  )  [private]
void ColPack::BipartiteGraphPartialColoring::Clear (  )  [virtual]
double ** ColPack::BipartiteGraphPartialColoring::GetLeftSeedMatrix ( int *  i_SeedRowCount,
int *  i_SeedColumnCount 
)

Generate and return the Left Seed matrix. This Seed matrix is managed and freed by ColPack.

Precondition:

Postcondition:

  • Size of the returned matrix is (*i_SeedRowCount) rows x (*i_SeedColumnCount) columns. (*i_SeedColumnCount) == num of rows of the original matrix == GetRowVertexCount() (*i_SeedRowCount) == num of colors used to color the left (row) vertices == GetVertexColorCount().

Notes:

  • This Seed matrix is managed and automatically freed by ColPack when the Graph object is deleted. Therefore, the user should NOT attempt to free the Seed matrix again.

Definition at line 680 of file BipartiteGraphPartialColoring.cpp.

References dp2_Seed, i_seed_rowCount, m_i_LeftVertexColorCount, m_vi_LeftVertexColors, seed_available, and Seed_reset().

Referenced by GetSeedMatrix().

Here is the call graph for this function:

Here is the caller graph for this function:

double ** ColPack::BipartiteGraphPartialColoring::GetLeftSeedMatrix_unmanaged ( int *  i_SeedRowCount,
int *  i_SeedColumnCount 
)

Same as GetLeftSeedMatrix(), except that this Seed matrix is NOT managed by ColPack.

Notes:

  • This Seed matrix is NOT managed by ColPack. Therefore, the user should free the Seed matrix manually when the matrix is no longer needed.

Definition at line 738 of file BipartiteGraphPartialColoring.cpp.

References m_i_LeftVertexColorCount, and m_vi_LeftVertexColors.

Referenced by GetSeedMatrix_unmanaged().

Here is the caller graph for this function:

int ColPack::BipartiteGraphPartialColoring::GetLeftVertexColorCount (  ) 

Definition at line 457 of file BipartiteGraphPartialColoring.cpp.

References m_i_LeftVertexColorCount, and STEP_UP.

Referenced by toFileBiPC().

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::GetLeftVertexColors ( vector< int > &  output  ) 
double ** ColPack::BipartiteGraphPartialColoring::GetRightSeedMatrix ( int *  i_SeedRowCount,
int *  i_SeedColumnCount 
)

Return the Right Seed matrix. This Seed matrix is managed and freed by ColPack.

Precondition:

Postcondition:

  • Size of the returned matrix is (*i_SeedRowCount) rows x (*i_SeedColumnCount) columns. (*i_SeedRowCount) == num of columns of the original matrix == GetColumnVertexCount() (*i_SeedColumnCount) == num of colors used to color the right (column) vertices == GetVertexColorCount().

Notes:

  • This Seed matrix is managed and automatically freed by ColPack when the Graph object is deleted. Therefore, the user should NOT attempt to free the Seed matrix again.

Definition at line 709 of file BipartiteGraphPartialColoring.cpp.

References dp2_Seed, i_seed_rowCount, m_i_RightVertexColorCount, m_vi_RightVertexColors, seed_available, and Seed_reset().

Referenced by GetSeedMatrix().

Here is the call graph for this function:

Here is the caller graph for this function:

double ** ColPack::BipartiteGraphPartialColoring::GetRightSeedMatrix_unmanaged ( int *  i_SeedRowCount,
int *  i_SeedColumnCount 
)

Same as GetRightSeedMatrix(), except that this Seed matrix is NOT managed by ColPack.

Notes:

  • This Seed matrix is NOT managed by ColPack. Therefore, the user should free the Seed matrix manually when the matrix is no longer needed.

Definition at line 761 of file BipartiteGraphPartialColoring.cpp.

References m_i_RightVertexColorCount, and m_vi_RightVertexColors.

Referenced by GetSeedMatrix_unmanaged().

Here is the caller graph for this function:

int ColPack::BipartiteGraphPartialColoring::GetRightVertexColorCount (  ) 

Definition at line 463 of file BipartiteGraphPartialColoring.cpp.

References m_i_RightVertexColorCount, and STEP_UP.

Referenced by main(), and toFileBiPC().

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::GetRightVertexColors ( vector< int > &  output  ) 
double ** ColPack::BipartiteGraphPartialColoring::GetSeedMatrix ( int *  i_SeedRowCount,
int *  i_SeedColumnCount 
)

Based on m_s_VertexColoringVariant, either GetLeftSeedMatrix() or GetRightSeedMatrix() will be called.

Reimplemented in ColPack::BipartiteGraphPartialColoringInterface.

Definition at line 797 of file BipartiteGraphPartialColoring.cpp.

References GetLeftSeedMatrix(), GetRightSeedMatrix(), and m_s_VertexColoringVariant.

Here is the call graph for this function:

double ** ColPack::BipartiteGraphPartialColoring::GetSeedMatrix_unmanaged ( int *  i_SeedRowCount,
int *  i_SeedColumnCount 
)

Based on m_s_VertexColoringVariant, either GetLeftSeedMatrix_unmanaged() or GetRightSeedMatrix_unmanaged() will be called.

Definition at line 812 of file BipartiteGraphPartialColoring.cpp.

References GetLeftSeedMatrix_unmanaged(), GetRightSeedMatrix_unmanaged(), and m_s_VertexColoringVariant.

Referenced by ColPack::BipartiteGraphPartialColoringInterface::GenerateSeedJacobian_unmanaged(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::BipartiteGraphPartialColoring::GetVertexColorCount (  ) 

Definition at line 470 of file BipartiteGraphPartialColoring.cpp.

References m_i_VertexColorCount, and STEP_UP.

double ColPack::BipartiteGraphPartialColoring::GetVertexColoringTime (  ) 

Definition at line 869 of file BipartiteGraphPartialColoring.cpp.

References m_d_ColoringTime.

Referenced by toFileBiPC().

Here is the caller graph for this function:

string ColPack::BipartiteGraphPartialColoring::GetVertexColoringVariant (  ) 

Definition at line 477 of file BipartiteGraphPartialColoring.cpp.

References m_s_VertexColoringVariant.

Referenced by PrintColumnPartialColoringMetrics(), and PrintRowPartialColoringMetrics().

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::GetVertexPartialColors ( vector< int > &  output  ) 

Based on m_s_VertexColoringVariant, either GetLeftVertexColors() or GetRightVertexColors() will be called.

Definition at line 827 of file BipartiteGraphPartialColoring.cpp.

References GetLeftVertexColors(), GetRightVertexColors(), and m_s_VertexColoringVariant.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int ColPack::BipartiteGraphPartialColoring::PartialDistanceTwoColumnColoring (  ) 
int ColPack::BipartiteGraphPartialColoring::PartialDistanceTwoRowColoring (  ) 
void ColPack::BipartiteGraphPartialColoring::PrintColumnPartialColoringMetrics (  ) 
void ColPack::BipartiteGraphPartialColoring::PrintColumnPartialColors (  ) 

Definition at line 540 of file BipartiteGraphPartialColoring.cpp.

References ColPack::StringTokenizer::GetLastToken(), m_i_VertexColorCount, ColPack::BipartiteGraphCore::m_s_InputFile, m_vi_RightVertexColors, and STEP_UP.

Referenced by main(), and PrintPartialColors().

Here is the call graph for this function:

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::PrintPartialColoringMetrics (  ) 

Based on m_s_VertexColoringVariant, either PrintRowPartialColoringMetrics() or PrintColumnPartialColoringMetrics() will be called.

Definition at line 784 of file BipartiteGraphPartialColoring.cpp.

References m_s_VertexColoringVariant, PrintColumnPartialColoringMetrics(), and PrintRowPartialColoringMetrics().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::PrintPartialColors (  ) 

Based on m_s_VertexColoringVariant, either PrintRowPartialColors() or PrintColumnPartialColors() will be called.

Definition at line 841 of file BipartiteGraphPartialColoring.cpp.

References m_s_VertexColoringVariant, PrintColumnPartialColors(), and PrintRowPartialColors().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::PrintRowPartialColoringMetrics (  ) 
void ColPack::BipartiteGraphPartialColoring::PrintRowPartialColors (  ) 

Definition at line 509 of file BipartiteGraphPartialColoring.cpp.

References ColPack::StringTokenizer::GetLastToken(), m_i_VertexColorCount, ColPack::BipartiteGraphCore::m_s_InputFile, m_vi_LeftVertexColors, and STEP_UP.

Referenced by PrintPartialColors().

Here is the call graph for this function:

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::PrintVertexPartialColorClasses (  ) 
void ColPack::BipartiteGraphPartialColoring::Reset (  )  [virtual]
void ColPack::BipartiteGraphPartialColoring::Seed_init (  )  [protected]

Definition at line 179 of file BipartiteGraphPartialColoring.cpp.

References dp2_Seed, i_seed_rowCount, and seed_available.

Referenced by BipartiteGraphPartialColoring().

Here is the caller graph for this function:

void ColPack::BipartiteGraphPartialColoring::Seed_reset (  )  [protected]

Definition at line 186 of file BipartiteGraphPartialColoring.cpp.

References dp2_Seed, free_2DMatrix(), i_seed_rowCount, and seed_available.

Referenced by GetLeftSeedMatrix(), GetRightSeedMatrix(), ~BipartiteGraphPartialColoring(), and ColPack::BipartiteGraphPartialColoringInterface::~BipartiteGraphPartialColoringInterface().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 112 of file BipartiteGraphPartialColoring.h.

Referenced by Clear(), and Reset().