Turi Create  4.0
graph_coloring.hpp
1 /* Copyright © 2017 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 #include <model_server/lib/toolkit_function_specification.hpp>
7 #ifndef TURI_UNITY_GRAPH_COLORING
8 #define TURI_UNITY_GRAPH_COLORING
9 
10 namespace turi {
11 namespace graph_coloring{
12 /**
13  * Obtains the registration for the Graph Coloring Toolkit
14  *
15  * Colors the graph such that adjacent vertices do not have the same color.
16  * This implements a heuristic coloring and there are no guarantees that it will
17  * find the smallest coloring; just a minimal coloring (i.e. there are no
18  * local single vertex color changes that will improve the coloring).
19  * Consecutive executions may return different colorings.
20  *
21  * <b> Toolkit Name: graph_coloring </b>
22  *
23  * Accepted Parameters: None
24  *
25  * Returned Parameters:
26  * \li \b training_time (flexible_type: float). The training time of the algorithm in seconds
27  * excluding all other preprocessing stages.
28  *
29  * \li \b num_colors (flexible_type: int) The total number of colors found
30  *
31  * \li \b __graph__ (unity_graph). The graph object with the field "component_id",
32  * The component_id field (integer) on each vertex contains the component ID
33  * of the vertex. All vertices with the same component ID are connected.
34  * component IDs are not sequential and can be arbitrary integers.
35  */
36 std::vector<toolkit_function_specification> get_toolkit_function_registration();
37 
38 } // namespace graph_coloring
39 } // namespace turi
40 #endif