Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

graphmatrices: weird convert, and also tests required #555

Closed
sbromberger opened this issue Mar 21, 2017 · 8 comments
Closed

graphmatrices: weird convert, and also tests required #555

sbromberger opened this issue Mar 21, 2017 · 8 comments

Comments

@sbromberger
Copy link
Owner

@jpfairbanks

in https://github.com/JuliaGraphs/LightGraphs.jl/blob/9dd2b872a7d8bd5355fc85daca96fd7a63d6670c/src/linalg/graphmatrices.jl#L234, the conversion to a CombinatorialAdjacency actually produces a SparseMatrix. Is this intended?

Also - see https://codecov.io/gh/JuliaGraphs/LightGraphs.jl/compare/9dd2b872a7d8bd5355fc85daca96fd7a63d6670c...faff97a7c5b7df545861afd4c5b344a5986a49f8/src/src/linalg/graphmatrices.jl for the latest test coverage.

@jpfairbanks
Copy link
Contributor

The tests on #541 sbromberger/simplegraphs are working for me. Is there anything still broken there?

@sbromberger
Copy link
Owner Author

they're working but I'd like the conversion issue fixed, and more tests, in graphmatrices. I'm not knowledgeable enough to fix this myself.

@jpfairbanks
Copy link
Contributor

So the problem as I understand it is that if you have a

A::CombinatorialAdjacency(g)
B = CombinatorialAdjacency(A)
B == g #current behavior
B == A #intended behavior

Is that what you are concerned about?

@sbromberger
Copy link
Owner Author

Yes. Is this significant? You're converting to a CombinatorialAdjacency which implies that you should be returning a CombinatorialAdjacency, but instead you're returning a matrix.

@jpfairbanks
Copy link
Contributor

Yeah the current behavior is incorrect. CombinatorialAdjacency(CombinatorialAdjacency(g)) == CombinatorialAdjacency(g) should be true for all g.

@jpfairbanks
Copy link
Contributor

This never came up in my usage because I never tried to use it like that.

@sbromberger
Copy link
Owner Author

That's what you get when you put someone who doesn't know what he's doing in charge of moving your code to 0.6 :)

@jpfairbanks
Copy link
Contributor

PR incoming.

jpfairbanks added a commit that referenced this issue Mar 23, 2017
CombinatorialAdjacency(CombinatorialAdjacency(g)) was returning the backing storage.
Fix includes tests.
sbromberger pushed a commit that referenced this issue Mar 23, 2017
CombinatorialAdjacency(CombinatorialAdjacency(g)) was returning the backing storage.
Fix includes tests.
sbromberger added a commit that referenced this issue Mar 29, 2017
* benchmarks

* add edgetype benchmark

katz centrality is broken.

* simplegraphs abstraction

* Edge is no longer a Pair

* pkgbenchmarks

* f

* remove data files from benchmarks

* simplegraphs, take 2

* more changes

* reshuffle

* fix tests

* more tests

* abstractions

* more tests

* tests and fixes

* trait fixes and tests - unrolling

* persistence and floyd-warshall

* make(di)graphs, through spanningtrees

* moved cliques, testing through connectivity.jl

* @jpfairbanks first round of review

* another fix

* all tests

* new simpletraits

* first cut at 0.6 compat

* squash

* update randgraphs.jl to use Channels over Tasks

Fixes deprecation warnings introduced in:

  JuliaLang/julia#19841

Changes an API interface:

  -function Graph(nvg::Int, neg::Int, edgestream::Task)
  +function Graph(nvg::Int, neg::Int, edgestream::Channel)

Iteration over Tasks is deprecated so now we iterate over the Channel.

* got rid of tasks in randgraphs

* graph -> g

* Add tutorials to section on docs (#547)

* Update README.md

* Update README.md

Made tutorials separate line and consistent with the other lines.

* type -> mutable struct

* more type -> mutable struct, plus OF detection for add_vertex!

* foo{T}(x::T) -> foo(x::T) where T

* test negative cycles

* test coverage

* manual cherry-pick of #551

* simplegraph/ -> simplegraphs, optimization for is_connected, some type simplifications

* re-add b-f tests

* Inferred (#554)

* core

* @inferred wherever possible

* empty -> zero

* test grid periodic=true

* oops

* redo graphmatrices tests

* linalg test fix

* loosen type restrictions in randgraphs functions

* readall -> readstring, and comment rationalization in randgraphs

* Fixes #555: graphmatrices convert incorrect on CA (#560)

CombinatorialAdjacency(CombinatorialAdjacency(g)) was returning the backing storage.
Fix includes tests.

* fixes #564

* one more test

* removed nv() and vertices() (#565)

* simpleedge tests

* test coverage

* short circuit B-F negative cycles, plus tests

* more test coverage

* more test coverage

* Docs (#567)

* docs, plus some various fixes (see blocking_flow).

* nodes -> vertices, node -> vertex, and more doc consistency

* doc fixes

* 1.0 -> 0.8

* docfix and benchmarks

* doc fixes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants