|
Boost Users : |
Subject: Re: [Boost-users] Modifying all matching elements in a Boost.MultiIndex Container
From: Joaquin M Lopez Munoz (joaquin_at_[hidden])
Date: 2016-01-01 06:28:51
Amit Prakash Ambasta <amit.prakash.ambasta <at> gmail.com> writes:
> Hey Joaquin
> First of all, thank you so much for your repeated help.
You're welcome. Please don't top post, as suggested by Boost mailing
lists guidelines:
http://www.boost.org/community/policy.html
> In line with the example provided, I've written a generic
> find_and_modify function as:
>
>
> Â Â template <typename T, typename F> Segment*
> find_and_modify(T& iterable, F filters, State s, double a_arr=-1,
> Comment rmk=Comment::INFO_SEGMENT_PREDICTED) {
> Â Â auto iter = iterable.find(filters);
>
> Â Â Â Â if (iter == iterable.end())
> Â Â Â Â return nullptr;
>
> Â Â Â Â std::pair<typename T::iterator, typename T::iterator>
> iteµ
¥¸ô¥ÑÉ
±¹ÅÕ
±}É
¹¡¥±ÑÉ̤ì(ø(ø
Ý¡¥±¡¥ÑÉ}µ
¥¸¹¥ÉÍÐô¥ÑÉ}µ
¥¸¹Í½¹¤ì(ø
ÕѼ¥Ðô½½ÍÐèéµÕ±Ñ¥}¥¹àèéÁɽ©Ðñ
Õàø (ø͵¹Ð°¥ÑÉ}µ
¥¸¹¥ÉÍФì(ø
͵¹Ð¹Ðñ
Õàø ¤¹µ½¥ä (ø
¥Ð°(ø
lÌ°
}
ÉȰɵt¡Mµ¹Ðͤì(ø
͹ÍÑ
ÑôÌì(ø
¥¡
}
ÉÈô´Ä¤(ø
͹
}
ÉÈô
}
ÉÈì(ø(ø
¥¡Éµ¬ô
½µµ¹Ðèé%9=}M59Q}AI%
Q¤ì(ø
͹½µµ¹Ðôɵ¬ì(ø
ô(ø
ô(ø
¤ì(ø
¥ÑÉ}µ
¥¸¹¥ÉÍЬ¬ì(ø
ô(ø(ø
**&WGW&â
6VvÖVçB¢b¦FW"°£â**УâÝNÂH[ÝÙ\[ÓÈÛÜÜÈXØ]\ÙHHÛÜ\ÈÝ\H[\HÙ\]Y[ÙBØ]^YÚ[
K]^[
JH
Ú]]^Z[ÜX][ÛÛX\ËÙ]YØ]^[X\O
JKÚXÚ\ÈÝXH[\[ÙYXØ][ÛÈÙH[[Y[È
] ÜÈH[ÛKXXØÙ\ÜÂ[^
K\ÈÙ\ÈÝ[Û]HÙ[È[Ý\ØÙ[\[ËÚ\H[ÝHYYÂÛÜÝ\HÝX[ÙHØKHÙHÙ\]Y[ÙNÜ]ÈÛÜÈØKHÛÝ[]HÈÚXÝÈH[ÙHØIËÊH[H]^[^ÚXÚÙÛÝ\ÙB\ÈÝHØ\ÙH
]\Ø[Ü\È\HY\[
KIÙ[ÛÈZÙHÈÚ[Ý]][Ý\\ØXÚXB[ÙYWÝ[ÝXWÜ[ÙH\È\HÛÜÝXZ[[È\ÝÛÜÜÂÛÜXÝHÝYÚ
ÝÙ]\[ÝIÝHÛÛ[Y[Y]]ÛÝ[HBÛÝÙ\\ØXÚ
BYX\Ý\H[Y\ÜX[ÙIÜÈÒÈÝXÚÈÈH[ÙYWÝ[ÝXWÜ[ÙB\ØXÚaux index technique can be made to work with a little more
effort (basically, by rearranging the index with rearrange()) but
you might not need to anyway if modify_unstable_range is good enough
(and there's no guarantee it's going to be faster to begin with).
JoaquÃn M López Muñoz
Telefónica
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net