Zoltan User's Guide  |  Next  |  Previous

Coloring Functions

Zoltan provides limited capability for coloring a set of objects, typically given as a graph. In graph coloring, each vertex is assigned an integer label such that no two adjacent vertices have the same label. The following functions are the coloring interface functions in the Zoltan library; their descriptions are included below.
Zoltan_Color


C: int Zoltan_Color (
      struct Zoltan_Struct *zz,
      int num_gid_entries,
      int num_obj,
      ZOLTAN_ID_PTR global_ids,
      int *color_exp);
FORTRAN: Not yet available.
C++: int Zoltan::Color (
      int &num_gid_entries,
      const int &num_obj,
      ZOLTAN_ID_PTR global_ids,
      int *color_exp);

Zoltan_Color invokes the coloring routine and the assigned colors of each object are returned in the array color_exp. color_exp[i]gives the color of global_ids[i] in the computed coloring. The arrays global_ids and color_exp should all be allocated by the application before Zoltan_Color is called. global_ids must contain the global ids of the elements for which the current processor wants coloring informations.
 
Arguments:
    zz Pointer to the Zoltan structure, created by Zoltan_Create, to be used in this invocation of the load-balancing routine.
    num_gid_entries Input: the number of array entries used to describe a single global ID.  This value is the maximum value over all processors of the parameter NUM_GID_ENTRIES.
    num_obj Number of objects for which we want to know the color on this processor. Objects may be non-local or duplicated.
    global_ids An array of global IDs of objects for which we want to know the color on this processor. Size of this array must be num_obj.
Objects may be non-local. Objects IDs may be repeated on several processor.
    color_exp Upon return, an array of length num_obj containing the colors of objects. That is, color_exp[i] gives the color of global_ids[i] in the computed coloring. By default, colors are positive integers starting at one. Memory for this array must have been allocated before Zoltan_Color is called.
Returned Value:
    int Error code.


[Table of Contents  | Next:  Application-Registered Query Functions  |  Previous:  Ordering Functions  |  Privacy and Security]