COIN-OR::LEMON - Graph Library

Opened 11 years ago

Closed 11 years ago

#160 closed enhancement (fixed)

Find more appropriate names for InvertableMap and DescriptorMap

Reported by: Alpar Juttner Owned by: Balazs Dezso
Priority: critical Milestone: LEMON 1.1 release
Component: core Version: hg main
Keywords: Cc:
Revision id:

Description (last modified by Alpar Juttner)

InvertableMap and DescriptorMap has been removed from the 1.0 release but they are still there in the main branch (as of [1e81878b0e54]).

Attachments (1)

66969f54d61d.patch (8.7 KB) - added by Alpar Juttner 11 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 years ago by Alpar Juttner

Priority: majorcritical

comment:2 Changed 11 years ago by Alpar Juttner

Description: modified (diff)
Summary: Find more appropriate names for InverseMap and DescriptorMapFind more appropriate names for InvertableMap and DescriptorMap

comment:3 Changed 11 years ago by Balazs Dezso

Status: newassigned

comment:4 Changed 11 years ago by Peter Kovacs

I think DescriptorMap and DescriptorMap::InverseMap are fully acceptable.

However InvertableMap is really misleading. InvertMap would be much better, but maybe it is too similar to InverseMap. Or what about names like ReverseMap, OppositeMap, BackwardMap? (I don't even find them so good.)

At the moment I think InvertMap and InvertMap::InverseMap would be the best choice.

comment:5 in reply to:  4 ; Changed 11 years ago by Alpar Juttner

Replying to kpeter:

I think DescriptorMap and DescriptorMap::InverseMap are fully acceptable.

Do you think the DescriptorMap describes something or give a description of something.

Probably RangeMap would be a good name. Alas, it is already used. Too bad, what we call now as RangeMap is also very badly named.

However InvertableMap is really misleading. InvertMap would be much better, but maybe it is too similar to InverseMap. Or what about names like ReverseMap, OppositeMap, BackwardMap? (I don't even find them so good.)

At the moment I think InvertMap and InvertMap::InverseMap would be the best choice.

What about CrossMap or CrossRefMap?

comment:6 in reply to:  5 ; Changed 11 years ago by Peter Kovacs

Replying to alpar:

Do you think the DescriptorMap describes something or give a description of something.

No, but it gives a descriptor for an item. As far as I know this notion is used for something like id, but in this case "id" cannot be used, since the ids of the items can be differ from these descriptors.

Probably RangeMap would be a good name.

I don't think so.

Alas, it is already used. Too bad, what we call now as RangeMap is also very badly named.

Could you suggest a better name? (Suppose that we don't have to preserve compatibility.)

However InvertableMap is really misleading. InvertMap would be much better, but maybe it is too similar to InverseMap. Or what about names like ReverseMap, OppositeMap, BackwardMap? (I don't even find them so good.)

At the moment I think InvertMap and InvertMap::InverseMap would be the best choice.

What about CrossMap or CrossRefMap?

CrossRefMap is better.

comment:7 in reply to:  6 Changed 11 years ago by Alpar Juttner

Replying to kpeter:

Replying to alpar:

Do you think the DescriptorMap describes something or give a description of something.

No, but it gives a descriptor for an item.

A descriptor is something that describe something else.

As far as I know this notion is used for something like id,

I don't think so.

but in this case "id" cannot be used, since the ids of the items can be differ from these descriptors.

Neither id nor decri* is an appropriate name here, as it fails to express that this tool maps a set of items to a range of integers, which is the main and only purpose of this tool.

Probably RangeMap would be a good name.

I don't think so.

Why?

Compare it with e.g. BoolMap, which is used at several places. It maps the items to bools. When we say ReadMap, then read also refers to the property of the Values. But RangeMap maps from a range. Very confusing, even if we have NodeMap and EdgeMap.

Alas, it is already used. Too bad, what we call now as RangeMap is also very badly named.

Could you suggest a better name?

No, as it is already in LEMON-1.0. Otherwise VectorMap would be an at least better name.

(Suppose that we don't have to preserve compatibility.)

You wrongly suppose that. I would like to very strictly stick on the rule of backward compatibility, even in case the chance that the change breaks someone's code is very low.

comment:8 Changed 11 years ago by Alpar Juttner

Can we agree in using CrossRefMap for InvertableMap?

If yes, the we only need to find a better name for DescriptorMap

comment:9 in reply to:  8 ; Changed 11 years ago by Peter Kovacs

Replying to alpar:

Can we agree in using CrossRefMap for InvertableMap?

It seems a good choice.

If yes, the we only need to find a better name for DescriptorMap.

What about ContinousIdMap or maybe MutableIdMap?

comment:10 in reply to:  9 ; Changed 11 years ago by Alpar Juttner

Replying to kpeter:

What about ContinousIdMap

I prefer ContinuousIdMap?. :)

Otherwise it looks good.

or maybe MutableIdMap?

Don't like it. Firstly, IMHO it is not "mutable" but "mutation". Secondly this property is not the feature which we like to use it for, but instead a rather annoying side effect of it.

So, can we say the winners are ContinuousIdMap and CrossRefMap?

comment:11 in reply to:  10 ; Changed 11 years ago by Peter Kovacs

Replying to alpar:

So, can we say the winners are ContinuousIdMap and CrossRefMap?

I think, we can. They are much better than the current names.

Anyone else?

comment:12 in reply to:  11 ; Changed 11 years ago by Alpar Juttner

Replying to kpeter:

Replying to alpar:

So, can we say the winners are ContinuousIdMap and CrossRefMap?

One more idea. I always have problem with spelling the word "continuous", (and so do Peter :) ). What about using RandeIdMap instead? (Yes, it is similar to RangeMap which is something very different, but I don't think it is a problem.)

Changed 11 years ago by Alpar Juttner

Attachment: 66969f54d61d.patch added

comment:13 in reply to:  12 ; Changed 11 years ago by Alpar Juttner

Replying to alpar:

One more idea. I always have problem with spelling the word "continuous", (and so do Peter :) ). What about using RandeIdMap instead? (Yes, it is similar to RangeMap which is something very different, but I don't think it is a problem.)

[66969f54d61d] does these renames. Could someone have a look at it?

comment:14 in reply to:  13 ; Changed 11 years ago by Peter Kovacs

Replying to alpar:

[66969f54d61d] does these renames. Could someone have a look at it?

There is a strange sentence in the doc: "So, the ids will can change when you deleting an item of the same type.", where both "will can" and "you deleting" seem to be wrong. And a small improvement: also use "\e" before RangeId at lines 2253 and 2255 like the lines 2246 and 2248.

comment:15 in reply to:  14 Changed 11 years ago by Alpar Juttner

Resolution: fixed
Status: assignedclosed

Replying to kpeter:

There is a strange sentence in the doc: "So, the ids will can change when you deleting an item of the same type.", where both "will can" and "you deleting" seem to be wrong. And a small improvement: also use "\e" before RangeId at lines 2253 and 2255 like the lines 2246 and 2248.

Fixed in [be6646ac5d89].

Note: See TracTickets for help on using tickets.