Realm

oa::data::OhlcvView

Validated borrowed candles. Prices and volume accept F32 or F64 columns; timestamps are I64. Source columns remain immutable while this view exists.

StRust public API

Declaration

pub struct OhlcvView<'a> { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn timestamps(self) -> &'a [i64]
pub fn time_unit(self) -> UnixTimeUnit
pub fn columns(self) -> [SeriesView<'a>; 5]
pub fn len(self) -> usize
pub fn is_empty(self) -> bool
pub fn slice(self, range: Range<usize>) -> Result<Self>
pub fn chronological_split( self, train_end: usize, validation_end: usize, ) -> Result<[Self; 3]>
fn clone(&self) -> OhlcvView<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result

Associated Functions

pub fn new_from_frame(frame: &'a DataFrame, unit: UnixTimeUnit) -> Result<Self>
pub fn new_from_frame_view( frame: DataFrameView<'a>, unit: UnixTimeUnit, ) -> Result<Self>

Public Method Documentation

pub fn timestamps( self ) -> &'a [i64]
No public source comment is attached to this declaration.
pub fn time_unit( self ) -> UnixTimeUnit
No public source comment is attached to this declaration.
pub fn columns( self ) -> [SeriesView<'a>; 5]
No public source comment is attached to this declaration.
pub fn len( self ) -> usize
No public source comment is attached to this declaration.
pub fn is_empty( self ) -> bool
No public source comment is attached to this declaration.
pub fn slice( self, range: Range<usize> ) -> Result<Self>
No public source comment is attached to this declaration.
pub fn chronological_split( self, train_end: usize, validation_end: usize ) -> Result<[Self; 3]>
No public source comment is attached to this declaration.
fn clone( &self ) -> OhlcvView<'a>
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
pub fn new_from_frame( frame: &'a DataFrame, unit: UnixTimeUnit ) -> Result<Self>
No public source comment is attached to this declaration.
pub fn new_from_frame_view( frame: DataFrameView<'a>, unit: UnixTimeUnit ) -> Result<Self>
No public source comment is attached to this declaration.