| 117 | } |
| 118 | |
| 119 | std::vector<int64_t> |
| 120 | HGraph::Build(const DatasetPtr& data) { |
| 121 | CHECK_ARGUMENT(GetNumElements() == 0, "index is not empty"); |
| 122 | this->Train(data); |
| 123 | std::vector<int64_t> ret; |
| 124 | if (graph_type_ == GRAPH_TYPE_VALUE_NSW) { |
| 125 | ret = this->Add(data); |
| 126 | } else { |
| 127 | ret = this->build_by_odescent(data); |
| 128 | } |
| 129 | if (use_elp_optimizer_) { |
| 130 | elp_optimize(); |
| 131 | } |
| 132 | return ret; |
| 133 | } |
| 134 | |
| 135 | JsonType |
| 136 | HGraph::map_hgraph_param(const JsonType& hgraph_json) { |
no test coverage detected