Re: string parser
From: Till Crueger (TillFC_at_gmx.net)
Date: 08/18/04
- Next message: Andre Kostur: "Re: Broken STL implementation?"
- Previous message: Kai-Uwe Bux: "Re: Broken STL implementation?"
- In reply to: Raghavendra Mahuli: "string parser"
- Next in thread: Raghavendra Mahuli: "Re: string parser"
- Reply: Raghavendra Mahuli: "Re: string parser"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 18 Aug 2004 17:45:03 +0200
On Wed, 18 Aug 2004 16:15:36 +0530, Raghavendra Mahuli wrote:
> Hi,
> I have many strings. I have to sort them. But sorting is not according to
> ascii but according to a different format (which keeps varying) . So i can
> sort them based on sort-order. It is not much of a problem.
>
> But the complex part is "equivalent-values". it can be defined that "ai" and
> "ae" are equivalent-values. Then, while sorting two strings, i have to
> consider that "ai" and "ae" are equal......only if they come at same
> position in both the strings....
[snip]
> In short, the "equivalent-values" applies only when the
> "position-matches"...
>
> To add to that such equivalent values are many......
> So can you please suggest me some way of solving this problem ....
If you aren't very carefull how you obtain such equivalencies, then the
Problem is not solvable. For example with your equivalency rules above one
can determine that aia<aez of the substitution of ai and ae. However when
you compare afa to those strings you get afa<aia and aez<afa so you get:
afa<aia<aez<afa, which destroys all possibilities of ordering.
Till
-- Please add "Salt and Peper" to the subject line to bypass my spam filter
- Next message: Andre Kostur: "Re: Broken STL implementation?"
- Previous message: Kai-Uwe Bux: "Re: Broken STL implementation?"
- In reply to: Raghavendra Mahuli: "string parser"
- Next in thread: Raghavendra Mahuli: "Re: string parser"
- Reply: Raghavendra Mahuli: "Re: string parser"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|