GithubHelp home page GithubHelp logo

ahojukka5 / vertexfinder.jl Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 9 KB

The need to determine pseudoperipheral vertices arises from several graph-theoretical approaches for ordering sparse matrix equations. This package implements George-Liu algorithm for finding a pseudoperipheral vertex in a graph aiming at returning a vertex having a large eccentricity.

License: MIT License

Julia 100.00%
graph vertex peudoperipheral node george liu fem matrix sparse

vertexfinder.jl's Introduction

VertexFinder.jl

Package author: Jukka Aho (@ahojukka5)

The need to determine pseudoperipheral vertices arises from several graph-theoretical approaches for ordering sparse matrix equations. This package implements George-Liu algorithm for finding a pseudoperipheral vertex in a graph aiming at returning a vertex having a large eccentricity.

Usage

Let's consider the following graph:

It is easy to see that peripheral vertices for this graph are 9 and 6. The requirement for the description of the graph is the following: graph must implement getindex and each adjacency list must be iterable. For example, list of lists or dictionary of lists meets the requirements.

G = Dict(
    1 => (3, 8, 9),
    2 => (3, 8, 7),
    3 => (1, 2),
    4 => (8, 9),
    5 => (7, 8),
    6 => (2, 7),
    7 => (5, 2, 6),
    8 => (1, 2, 4, 5),
    9 => (1, 4))

Starting from node 1:

w0 = 1
w1 = find(G, w0)
w2 = find(G, w1)
w3 = find(G, w2)
println(w1)
println(w2)
println(w3)

# output

6
9
6

Contributing to project

Any contributions are highly appreciated! If you have some good ideas how to make this package better, feel free to open an issue or send me an email.

vertexfinder.jl's People

Contributors

ahojukka5 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

vertexfinder.jl's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.