From 86c750618f3b2a677ba76bc69d544def91bd102b Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Wed, 18 Jan 2023 11:14:13 +0100 Subject: [PATCH] more doc --- mo/src/problems/partition/moBinaryPartition.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mo/src/problems/partition/moBinaryPartition.h b/mo/src/problems/partition/moBinaryPartition.h index e74d0ea64..c91c2848b 100644 --- a/mo/src/problems/partition/moBinaryPartition.h +++ b/mo/src/problems/partition/moBinaryPartition.h @@ -113,12 +113,16 @@ class moBinaryPartition : public EO assert(has_inserted); } - /** Serialization of the `selected` atoms. */ + /** Serialization of the `selected` and `rejected` atoms. + * + * Output a string of the form (spaces replaced with period here, to show their count): + * `.........` + */ virtual void printOn(std::ostream& out) const { EO::printOn(out); // Fitness. // Trailing space already inserted. - out << selected.size() << " "; // Size. + out << " " << selected.size() << " "; // Size. std::copy(std::begin(selected), std::end(selected), std::ostream_iterator(out, " ")); // Values. out << " "; @@ -127,7 +131,11 @@ class moBinaryPartition : public EO std::ostream_iterator(out, " ")); // Values. } - /** Deserialization of the `selected` atoms. */ + /** Deserialization of the `selected` and `rejected` atoms. + * + * Expects a string of the form (spaces replaced with period here, to show their count): + * `.........` + */ virtual void readFrom(std::istream& in) { EO::readFrom(in); // Fitness.