Skip to content

Commit

Permalink
Code formatting & linting.
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Hansen <marvin.hansen@gmail.com>
  • Loading branch information
marvin-hansen committed Jan 25, 2024
1 parent d8eec5a commit 274dc50
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion deep_causality/examples/ctx/src/io/file/parquet_2_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

use chrono::{DateTime, TimeZone, Utc};
use parquet::record::{Row, RowAccessor};
use rust_decimal::Decimal;
use rust_decimal::prelude::FromPrimitive;
use rust_decimal::Decimal;

use crate::types::data_symbol::DataSymbol;
use crate::types::date_time_bar::DateTimeBar;
Expand Down
2 changes: 1 addition & 1 deletion deep_causality/examples/ctx/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use deep_causality::prelude::{ContextuableGraph, Identifiable, TimeScale};

use crate::model::get_main_causaloid;
use crate::utils;
use crate::workflow::{build_time_data_context, load_data};
use crate::workflow::build_model::build_model;
use crate::workflow::{build_time_data_context, load_data};

pub fn run() {
// Determines the maximum level of time resolution in the context hypergraph.
Expand Down
1 change: 0 additions & 1 deletion deep_causality/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,3 @@ pub use crate::types::reasoning_types::observation::Observation;
// Utils
//
pub use crate::utils::time_utils::*;

Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ use std::ops::{Add, Mul, Sub};
use crate::prelude::{Context, Datable, Indexable, SpaceTemporal, Spatial, Temporable};

impl<'l, D, S, T, ST, V> Indexable for Context<'l, D, S, T, ST, V>
where
D: Datable,
S: Spatial<V>,
T: Temporable<V>,
ST: SpaceTemporal<V>,
V: Default + Add<V, Output=V> + Sub<V, Output=V> + Mul<V, Output=V>,
where
D: Datable,
S: Spatial<V>,
T: Temporable<V>,
ST: SpaceTemporal<V>,
V: Default + Add<V, Output = V> + Sub<V, Output = V> + Mul<V, Output = V>,
{
fn get_index(&self, key: &usize, current: bool) -> Option<&usize> {
{
if current {
self.current_index_map.get(&key)
self.current_index_map.get(key)
} else {
self.previous_index_map.get(&key)
self.previous_index_map.get(key)
}
}
}
Expand Down

0 comments on commit 274dc50

Please sign in to comment.