Skip to content

Commit

Permalink
feat(brownian_motion): init and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emptymalei committed Mar 15, 2024
1 parent 9aa3ed0 commit 50be479
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/references/models/brownian_motion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Brownian Motion

::: hamilflow.models.brownian_motion
12 changes: 9 additions & 3 deletions hamilflow/models/brownian_motion.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from functools import cached_property
from typing import Union
from typing import Dict, Optional, Union

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -63,15 +63,21 @@ class BrownianMotion:
$$
References:
1. Brownian motion and random walks. [cited 13 Mar 2024].
Available: https://web.mit.edu/8.334/www/grades/projects/projects17/OscarMickelin/brownian.html
2. Contributors to Wikimedia projects. Brownian motion.
In: Wikipedia [Internet]. 22 Jan 2024 [cited 13 Mar 2024].
Available: https://en.wikipedia.org/wiki/Brownian_motion
"""

def __init__(self):
pass
def __init__(
self,
system: Dict[str, float],
initial_condition: Optional[Dict[str, float]] = {},
):
self.system = BrownianMotionSystem.model_validate(system)
self.initial_condition = BrownianMotionIC.model_validate(initial_condition)

def __call__(self, n_steps: float, delta_t: float) -> pd.DataFrame:
pass
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ nav:
- "Tutorials":
- "Introduction": tutorials/index.md
- "Harmonic Oscillator": tutorials/harmonic_oscillator.py
- "Brownian Motion": tutorials/brownian_motion.py
- References:
- "Introduction": references/index.md
- "Models":
Expand Down

0 comments on commit 50be479

Please sign in to comment.