PETSc version 3.17.4
Fix/Edit manual page

# MatColoringSetMaxColors

Sets the maximum number of colors

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatColoringSetMaxColors(MatColoring mc,PetscInt maxcolors)

Logically Collective on MatColoring

### Input Parameters

| mc | - the MatColoring context
| maxcolors | - the maximum number of colors to produce

### Notes

This may be used to compute a certain number of independent sets from the graph. For instance, while using MATCOLORINGMIS and maxcolors = 1, one gets out an MIS. Vertices not in a color are set to have color maxcolors+1, which is not a valid color as they may be adjacent.

### See Also

MatColoringGetMaxColors(), MatColoringApply()

### Level

beginner

### Location

src/mat/color/interface/matcoloring.c
Index of all MatOrderings routines
Table of Contents for all manual pages
Index of all manual pages