Skip to content

Commit

Permalink
getting ready for version 0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
angelip2303 committed May 10, 2023
1 parent 374c9c7 commit 62d04c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ categories = ["algorithms", "database", "mathematics", "science"]

[dependencies]
polars = { version = "0.29.0", features = ["lazy"] }
ego-tree = "0.6.2"

[package.metadata.docs.rs]
features = []
Expand Down
9 changes: 1 addition & 8 deletions src/pregel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,6 @@ impl<'a> Pregel<'a> {
// execution is performed until all the nodes vote to halt, or the number of iterations is
// greater than the maximum number of iterations set by the user at the initialization of
// the model (see the `Pregel::new` method). We start by setting the number of iterations to 1.
println!("current_vertices: {:?}", current_vertices);
let mut iteration = 1;
// TODO: check that nodes are not halted.
while iteration <= self.max_iterations {
Expand All @@ -848,7 +847,6 @@ impl<'a> Pregel<'a> {
Column::edge(Column::Dst), // dst column of the resulting DataFrame
Column::dst(Column::Id), // id column of the current_vertices DataFrame
);
println!("triplets_df: {:?}", triplets_df.clone().collect());
// We create a DataFrame that contains the messages sent by the vertices. The messages
// are computed by performing an aggregation on the `triplets_df` DataFrame. The aggregation
// is performed on the `msg` column of the `triplets_df` DataFrame, and the aggregation
Expand Down Expand Up @@ -878,7 +876,6 @@ impl<'a> Pregel<'a> {
.select(send_messages)
.groupby([Column::msg(Some(Column::Id))])
.agg([aggregate_messages().alias(Column::Pregel.as_ref())]);
println!("message_df: {:?}", message_df.clone().collect());
// We Compute the new values for the vertices. Note that we have to check for possibly
// null values after performing the outer join. This is, columns where the join key does
// not exist in the source DataFrame. In case we find any; for example, given a certain
Expand All @@ -903,7 +900,6 @@ impl<'a> Pregel<'a> {
col(Column::Id.as_ref()),
v_prog().alias(self.vertex_column.as_ref()),
]);
println!("vertex_columns: {:?}", vertex_columns.clone().collect());
// We update the `current_vertices` DataFrame with the new values for the vertices. We
// do so by performing an inner join between the `current_vertices` DataFrame and the
// `vertex_columns` DataFrame. The join is performed on the `id` column of the
Expand Down Expand Up @@ -985,10 +981,7 @@ mod tests {
fn agg_pagerank(pagerank: Pregel) -> Result<f64, String> {
let result = match pagerank.run() {
Ok(result) => result,
Err(error) => {
println!("{}", error);
return Err(String::from("Error running the PageRank algorithm"));
}
Err(_) => return Err(String::from("Error running the PageRank algorithm")),
};
let rank = match result.column("rank") {
Ok(rank) => rank,
Expand Down

0 comments on commit 62d04c1

Please sign in to comment.