sg_objective.cpp
Go to the documentation of this file.
1 //=============================================================================
2 // Copyright (C) 2021-2024 Wageningen University - All Rights Reserved
3 // Author: Gonzalo Mier
4 // BSD-3 License
5 //=============================================================================
6 
8 
9 namespace f2c::obj {
10 
12  return 0.0;
13 }
14 
16  return std::accumulate(swaths.begin(), swaths.end(), 0.0,
17  [this] (double init, const auto& s) {
18  return init + this->computeCost(s);});
19 }
20 
22  return std::accumulate(swaths.begin(), swaths.end(), 0.0,
23  [this] (double init, const auto& s) {
24  return init + this->computeCost(s);});
25 }
26 
28  return computeCost(0.0, 0.0, cell);
29 }
30 
32  return std::accumulate(cells.begin(), cells.end(), 0.0,
33  [this] (double init, const auto& s) {
34  return init + this->computeCost(s);});
35 }
36 
38  double ang, double op_width, const F2CCell& cell) {
39  return 0.0;
40 }
41 
43  const F2CCell& c, const F2CSwath& s) {
44  return computeCost(c) + computeCost(s);
45 }
46 
48  const F2CCells& c, const F2CSwath& s) {
49  return computeCost(c) + computeCost(s);
50 }
51 
53  const F2CCell& c, const F2CSwaths& swaths) {
54  return std::accumulate(swaths.begin(), swaths.end(), 0.0,
55  [this, &c] (double init, const auto& s) {return init + computeCost(c, s);});
56 }
57 
59  const F2CSwathsByCells& swaths) {
60  return std::accumulate(swaths.begin(), swaths.end(), 0.0,
61  [this, &c] (double init, const auto& s) {return init + computeCost(c, s);});
62 }
63 
64 
66  const F2CCells& c, const F2CSwaths& swaths) {
67  return std::accumulate(swaths.begin(), swaths.end(), 0.0,
68  [this, &c] (double init, const auto& s) {return init + computeCost(c, s);});
69 }
70 
72  const F2CSwathsByCells& swaths) {
73  return std::accumulate(swaths.begin(), swaths.end(), 0.0,
74  [this, &c] (double init, const auto& s) {return init + computeCost(c, s);});
75 }
76 
77 
78 } // namespace f2c::obj
79 
5_route_planning.swaths
swaths
Definition: 5_route_planning.py:58
1_basic_types.cells
cells
Definition: 1_basic_types.py:93
1_basic_types.cell
cell
Definition: 1_basic_types.py:88
f2c::types::Swath
Definition: Swath.h:23
f2c::types::Cell
Definition: Cell.h:32
f2c::obj
Objective algorithms' namespace.
Definition: base_objective.h:14
f2c::types::Cells
Definition: Cells.h:21
f2c::types::SwathsByCells
Definition: SwathsByCells.h:17
sg_objective.h
f2c::obj::SGObjective::computeCost
virtual double computeCost(const F2CSwath &)
Compute the cost function.
Definition: sg_objective.cpp:11
f2c::types::Swaths
Definition: Swaths.h:20


fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31