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_lid_entries,
      int num_obj,
      ZOLTAN_ID_PTR global_ids,
      ZOLTAN_ID_PTR local_ids,
      int *color_exp);
FORTRAN: Not yet available.
C++: int Zoltan::Color (
      int &num_gid_entries,
      int &num_lid_entries,
      const int &num_obj,
      ZOLTAN_ID_PTR global_ids,
      ZOLTAN_ID_PTR local_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, local_ids,and color_exp should all be allocated by the application before Zoltan_Color is called. Each array must have space for (at least) num_obj elements, where num_obj is the number of objects residing on a processor.
 
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 Upon return, 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_lid_entries Upon return, the number of array entries used to describe a single local ID.  This value is the maximum value over all processors of the parameter NUM_LID_ENTRIES.
    num_obj Number of objects to color on this processor. num_obj should be the total number of objects residing on a processor.  
    global_ids Upon return, an array of global IDs of objects to be colored on this processor. (size = num_obj * num_gid_entries)
Memory for this array must have been allocated before Zoltan_Color is called.
    local_ids [Optional.] Upon return, an array of local IDs of objects to be colored on this processor. (size = num_obj * num_lid_entries)
Memory for this array must have been allocated before Zoltan_Color is called.
    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]