Opened 11 years ago

Closed 11 years ago

# Revise the documentation of kruskal()

Reported by: Owned by: Peter Kovacs Alpar Juttner major LEMON 1.0 release documentation hg main

### 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".

### comment:1 in reply to:  description ; follow-up:  2 Changed 11 years ago by Alpar Juttner

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 ; follow-up:  5 Changed 11 years ago by Peter Kovacs

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 follow-up:  4 Changed 11 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 11 years ago by Alpar Juttner

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 ; follow-up:  7 Changed 11 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 11 years ago by Peter Kovacs

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 ; follow-up:  9 Changed 11 years ago by Peter Kovacs

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 11 years ago by Alpar Juttner

Component: core → documentation

### comment:9 in reply to:  7 ; follow-up:  10 Changed 11 years ago by Alpar Juttner

Peter, could you do the missing changes?

### comment:10 in reply to:  9 ; follow-up:  11 Changed 11 years ago by Peter Kovacs

Peter, could you do the missing changes?

See [6d7bfcf5b48e].

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

Resolution: → fixed new → closed