OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "courgette/adjustment_method.h" | 5 #include "courgette/adjustment_method.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 | 1241 |
1242 typedef std::map<ShinglePattern::Index, | 1242 typedef std::map<ShinglePattern::Index, |
1243 ShinglePattern, ShinglePatternIndexLess> IndexToPattern; | 1243 ShinglePattern, ShinglePatternIndexLess> IndexToPattern; |
1244 IndexToPattern patterns_; | 1244 IndexToPattern patterns_; |
1245 | 1245 |
1246 DISALLOW_COPY_AND_ASSIGN(AssignmentProblem); | 1246 DISALLOW_COPY_AND_ASSIGN(AssignmentProblem); |
1247 }; | 1247 }; |
1248 | 1248 |
1249 class Adjuster : public AdjustmentMethod { | 1249 class Adjuster : public AdjustmentMethod { |
1250 public: | 1250 public: |
1251 Adjuster() {} | 1251 Adjuster() : prog_(NULL), model_(NULL) {} |
1252 ~Adjuster() {} | 1252 ~Adjuster() {} |
1253 | 1253 |
1254 bool Adjust(const AssemblyProgram& model, AssemblyProgram* program) { | 1254 bool Adjust(const AssemblyProgram& model, AssemblyProgram* program) { |
1255 LOG(INFO) << "Adjuster::Adjust"; | 1255 LOG(INFO) << "Adjuster::Adjust"; |
1256 prog_ = program; | 1256 prog_ = program; |
1257 model_ = &model; | 1257 model_ = &model; |
1258 return Finish(); | 1258 return Finish(); |
1259 } | 1259 } |
1260 | 1260 |
1261 bool Finish() { | 1261 bool Finish() { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 | 1312 |
1313 //////////////////////////////////////////////////////////////////////////////// | 1313 //////////////////////////////////////////////////////////////////////////////// |
1314 | 1314 |
1315 } // namespace adjustment_method_2 | 1315 } // namespace adjustment_method_2 |
1316 | 1316 |
1317 AdjustmentMethod* AdjustmentMethod::MakeShingleAdjustmentMethod() { | 1317 AdjustmentMethod* AdjustmentMethod::MakeShingleAdjustmentMethod() { |
1318 return new adjustment_method_2::Adjuster(); | 1318 return new adjustment_method_2::Adjuster(); |
1319 } | 1319 } |
1320 | 1320 |
1321 } // namespace courgette | 1321 } // namespace courgette |
OLD | NEW |