Turi Create  4.0
kcore.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_KCORE
8 #define TURI_UNITY_KCORE
9 
10 namespace turi {
11 namespace kcore {
12 
13 
14 /**
15  * Obtains the registration for the KCore Toolkit.
16  *
17  * Performs kcore decomposition on the graph.
18  *
19  * <b> Toolkit Name: kcore </b>
20  *
21  * Accepted Parameters:
22  * \li \b kmin (flexible_type: integer). The lowest KCore value to compute
23  * (inclusive). Defaults to 0. All vertices with a core value out of this
24  * range will have a core ID of -1.
25  *
26  * \li \b kmax (flexible_type: integer). The highest KCore value to compute
27  * (inclusive). Defaults to 100. All vertices with a core value out of this
28  * range will have a core ID of -1.
29  *
30  * Returned Parameters:
31  * \li \b training_time (flexible_type: float). The training time of the algorithm in seconds
32  * excluding all other preprocessing stages.
33  *
34  * \li \b max_core The largest core value encountered.
35  *
36  * \li \b __graph__ (unity_graph). The graph object with the field "core_id",
37  * The core_id field (integer) contains the core number of the vertex.
38  * This number will be in between kmin amd kmax (inclusive). All vertices with
39  * core values outside of this range will have core_id of -1.
40  */
41 std::vector<toolkit_function_specification> get_toolkit_function_registration();
42 
43 } // namespace kcore
44 } // namespace turi
45 #endif