https://github.com/mschauer/trajectories.jl
Maps from the line into spaces
https://github.com/mschauer/trajectories.jl
Last synced: over 1 year ago
JSON representation
Maps from the line into spaces
- Host: GitHub
- URL: https://github.com/mschauer/trajectories.jl
- Owner: mschauer
- License: other
- Created: 2018-09-11T08:54:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-16T12:28:44.000Z (over 5 years ago)
- Last Synced: 2025-02-27T10:12:35.466Z (over 1 year ago)
- Language: Julia
- Size: 29.3 KB
- Stars: 6
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Trajectories
A trajectory in the sense of this package is a vector of time points `t` and a corresponding
vector of spatial points `x`, which are though as locations `x[i]` of an object at times
`t[i]`.
A key decision which has to be made for a time series object,
is whether iteration is used to iterate values, pairs or is leveraged for destruction. See issue #1. At the moment,
all iteration and destructuring is explicit.
To iterate values `xᵢ`, pairs `(tᵢ, xᵢ)` or components `(t, x)`, use `values`, `pairs` or `Pair`
```julia
tᵢ in keys(X)
xᵢ in values(X)
(tᵢ, xᵢ) in pairs(X)
t, x = Pair(X)
```
A second key decision is what constitutes indexing. Also here this package is *agnostic*: Only key look-up
with `get` is implemented so far.
Trajectories support `Tables.jl` with `columns` being a named tuple `(t = X.t, x = X.x)`.