Later on in this example we will save our decision functions to disk. This pair of routines is needed for this functionality.
| 59 | // Later on in this example we will save our decision functions to disk. This |
| 60 | // pair of routines is needed for this functionality. |
| 61 | void serialize (const custom_decision_function& item, std::ostream& out) |
| 62 | { |
| 63 | // write the state of item to the output stream |
| 64 | serialize(item.positive_center, out); |
| 65 | serialize(item.negative_center, out); |
| 66 | } |
| 67 | |
| 68 | void deserialize (custom_decision_function& item, std::istream& in) |
| 69 | { |