Skip to content

MethodError: no method matching SimpleWeightedGraph(::Vector{Int64}, ::Vector{Int64}, ::typeof(weights)) #27

@ghost

Description

I've tried to create a samll graph and was wondering why it does not allow me to assign a weight parameter??


sources = rand(1:6, 10)
destinations = rand( 1:6, 10)
weights = 0.2.*rand(1:6, 10)

g = SimpleWeightedGraph(sources, destinations, weights)

Let's assume I could create a weighted graph, I've read the documentation and didn't find any command to be able to find the distance (or time--if it weighted based on time) between two nodes. Do you aware of any?

Thanks a lot for the package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions