Public Member Functions | Static Public Member Functions | List of all members
cudf::range_window_bounds Struct Reference

Abstraction for window boundary sizes, to be used with grouped_range_rolling_window(). More...

#include <range_window_bounds.hpp>

Public Member Functions

bool is_unbounded () const
 Whether or not the window is unbounded. More...
 
scalar const & range_scalar () const
 Returns the underlying scalar value for the bounds. More...
 
 range_window_bounds (range_window_bounds const &)=default
 Copy constructor.
 

Static Public Member Functions

static range_window_bounds get (scalar const &boundary)
 Factory method to construct a bounded window boundary. More...
 
static range_window_bounds unbounded (data_type type)
 Factory method to construct an unbounded window boundary. More...
 

Detailed Description

Abstraction for window boundary sizes, to be used with grouped_range_rolling_window().

Similar to window_bounds in grouped_rolling_window(), range_window_bounds represents window boundaries for use with grouped_range_rolling_window(). A window may be specified as either of the following:

  1. A fixed-width numeric scalar value. E.g. a) A DURATION_DAYS scalar, for use with a TIMESTAMP_DAYS orderby column b) An INT32 scalar, for use with an INT32 orderby column
  2. "unbounded", indicating that the bounds stretch to the first/last row in the group.

Definition at line 36 of file range_window_bounds.hpp.

Member Function Documentation

◆ get()

static range_window_bounds cudf::range_window_bounds::get ( scalar const &  boundary)
static

Factory method to construct a bounded window boundary.

Parameters
boundaryFinite window boundary
Returns
A bounded window boundary object

◆ is_unbounded()

bool cudf::range_window_bounds::is_unbounded ( ) const
inline

Whether or not the window is unbounded.

Returns
true If window is unbounded
false If window is of finite bounds

Definition at line 60 of file range_window_bounds.hpp.

◆ range_scalar()

scalar const& cudf::range_window_bounds::range_scalar ( ) const
inline

Returns the underlying scalar value for the bounds.

Returns
The underlying scalar value for the bounds

Definition at line 67 of file range_window_bounds.hpp.

◆ unbounded()

static range_window_bounds cudf::range_window_bounds::unbounded ( data_type  type)
static

Factory method to construct an unbounded window boundary.

Parameters
typetype The datatype of the window boundary
Returns
An unbounded window boundary object

The documentation for this struct was generated from the following file: