Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: experimental/webgtt/algorithms.cc

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/webgtt/algorithms.h ('k') | experimental/webgtt/build.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file.
4
5 #include "webgtt/algorithms.h"
6
7 #include <sstream>
8 #include <vector>
9
10 #include "webgtt/graph.h"
11
12 namespace webgtt {
13
14 std::string GetColoring(const graph::Graph& input_graph) {
15 std::vector<int> vertex_colors = input_graph.GetColoring();
16 // Format the message to be sent back to the browser.
17 std::ostringstream answer;
18 for (size_t i = 0; i < vertex_colors.size(); ++i) {
19 answer << vertex_colors[i];
20 if (i != vertex_colors.size() - 1) {
21 answer << ',';
22 }
23 }
24 return answer.str();
25 }
26
27 } // namespace webgtt
OLDNEW
« no previous file with comments | « experimental/webgtt/algorithms.h ('k') | experimental/webgtt/build.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698