COIN-OR::LEMON - Graph Library

Opened 16 years ago

Closed 16 years ago

#114 closed enhancement (fixed)

Revise the documentation of kruskal()

Reported by: Peter Kovacs Owned by: Alpar Juttner
Priority: major Milestone: LEMON 1.0 release
Component: documentation Version: hg main
Keywords: Cc:
Revision id:

Description

The attached patch file contains doc improvements for kruskal(), but there are two more things that should be revised.

  1. If the input graph is not connected (or the input digraph is not weakly connected), a spanning forest is calculated instead of a spanning tree. Am I right? I think, there should be a \note in the doc about this important case.
  2. The \warning seems to be meaningless. Perhaps a word is missing after "If Kruskal runs on an".

Attachments (2)

kruskal_doc_0c7c4dfacc8f.patch (3.8 KB) - added by Peter Kovacs 16 years ago.
kruskal_doc_6d7bfcf5b48e.patch (791 bytes) - added by Peter Kovacs 16 years ago.

Download all attachments as: .zip

Change History (13)

Changed 16 years ago by Peter Kovacs

comment:1 in reply to:  description ; Changed 16 years ago by Alpar Juttner

Replying to kpeter:

The attached patch file contains doc improvements for kruskal(), but there are two more things that should be revised.

  1. If the input graph is not connected (or the input digraph is not weakly connected), a spanning forest is calculated instead of a spanning tree. Am I right? I think, there should be a \note in the doc about this important case.

Yes, there should be.

  1. The \warning seems to be meaningless. Perhaps a word is missing after "If Kruskal runs on an".

Or more words. Or even the whole warning should be rephrased, because reading this warning, I'm pretty much confused what I'm warned about. For example, what does "Arc type" mean.

I was digging in the svn history and found that this comment is due to deba, -r3261. At that time "Arc type" was "Edge type" which is a bit better, but still confusing. Before that version, there was another \warning in the code saying:

/// \warning If kruskal runs on an
/// \ref lemon::concepts::UGraph "undirected graph", be sure that the
/// map storing the tree is also undirected
/// (e.g. ListUGraph::UEdgeMap<bool>, otherwise the values of the
/// half of the edges will not be set.
///

It may help fixing this warning.

comment:2 in reply to:  1 ; Changed 16 years ago by Peter Kovacs

Replying to alpar:

Or even the whole warning should be rephrased, because reading this warning, I'm pretty much confused what I'm warned about.

As I understand this warning should be only about using Edge for Graph types and Arc for Digraph types. However it seems to be clear in the current doc. What about removing thew warning?

comment:3 Changed 16 years ago by Peter Kovacs

The attached patch is now in the main branch, but with different hash id: [74cd0c58b348]. Could you tell me why?

comment:4 in reply to:  3 Changed 16 years ago by Alpar Juttner

Replying to kpeter:

The attached patch is now in the main branch, but with different hash id: [74cd0c58b348]. Could you tell me why?

Use 'hg diff' and you will see. (You wanted to change something (well, something unimportant) in your patch, but you made a mistake when you did it. I fix that in [74cd0c58b348]. Of course, I should have put a note here. I'm sorry)

comment:5 in reply to:  2 ; Changed 16 years ago by Alpar Juttner

As I understand this warning should be only about using Edge for Graph types and Arc for Digraph types.

Probably you mean EdgeMap}} and {{{ArcMap.

However it seems to be clear in the current doc. What about removing thew warning?

OK from my side.

comment:6 Changed 16 years ago by Peter Kovacs

Replying to alpar:

Use 'hg diff' and you will see. (You wanted to change something (well, something unimportant) in your patch, but you made a mistake when you did it. I fix that in [74cd0c58b348]. Of course, I should have put a note here. I'm sorry)

I see now. It's okay, thank you. I just missed your usual comment: "[...] went to the main branch".

comment:7 in reply to:  5 ; Changed 16 years ago by Peter Kovacs

Replying to alpar:

As I understand this warning should be only about using Edge for Graph types and Arc for Digraph types.

Probably you mean EdgeMap and ArcMap.

Yes, or an iteraror of an STL container with Edge/Arc as its value_type.

comment:8 Changed 16 years ago by Alpar Juttner

Component: coredocumentation

comment:9 in reply to:  7 ; Changed 16 years ago by Alpar Juttner

Peter, could you do the missing changes?

Thanks in advance.

Changed 16 years ago by Peter Kovacs

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

Replying to alpar:

Peter, could you do the missing changes?

See [6d7bfcf5b48e].

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

Resolution: fixed
Status: newclosed

Replying to kpeter:

Replying to alpar:

Peter, could you do the missing changes?

See [6d7bfcf5b48e].

Thanks.

Note: See TracTickets for help on using tickets.