Skip to content

Commit

Permalink
feat: basic page rank implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Dec 18, 2023
1 parent 5bd7008 commit 7ced405
Show file tree
Hide file tree
Showing 7 changed files with 427 additions and 16 deletions.
215 changes: 214 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "graph-view"
version = "0.1.22"
version = "0.1.23"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -15,6 +15,7 @@ bevy_panorbit_camera = { version="0.9" }
bevy_easings = "0.12.2"
forceatlas2 = "0.5.0"
bevy_mod_picking = { version="0.17.0", features = ["bevy_egui", "bevy_picking_egui"]}
graph = "0.3.1"

[profile.release]
lto = true
Expand Down
6 changes: 6 additions & 0 deletions src/events.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use bevy::prelude::*;
use forceatlas2::Settings;
use graph::page_rank::PageRankConfig;

#[derive(Event, Debug)]
pub struct SelectRandomIdentifierEvent;
Expand Down Expand Up @@ -31,6 +32,10 @@ pub struct Forceatlas2Event {
pub settings: Settings<f32>,
pub iterations: u32,
}
#[derive(Event)]
pub struct PageRankEvent {
pub config: PageRankConfig,
}

pub struct EventsPlugin;

Expand All @@ -43,6 +48,7 @@ impl Plugin for EventsPlugin {
.add_event::<AddIdentifiersEvent>()
.add_event::<MoveIdentifiersRndEvent>()
.add_event::<Forceatlas2Event>()
.add_event::<PageRankEvent>()
.add_event::<AddConnectionsEvent>();
}
}
Loading

0 comments on commit 7ced405

Please sign in to comment.