Skip to content

Commit

Permalink
- update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketlaunchr-cto committed Aug 11, 2020
1 parent 6f7b598 commit eaa3a4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ sx := dataframe.NewSeriesFloat64("x", nil, dataframe.Float64Range(1, float64(res
sy := dataframe.NewSeriesFloat64("y", &dataframe.SeriesInit{Size: res})
df := dataframe.NewDataFrame(sx, sy)

fn := funcs.RegularFunc("sin((2*𝜋*x)/24)")
fn := funcs.RegFunc("sin((2*𝜋*x)/24)")
funcs.PiecewiseFunc(ctx, df, fn, 1)
```

Expand Down
6 changes: 3 additions & 3 deletions math/funcs/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ type SubFuncDefn struct {
Domain *dataframe.Range
}

// RegularFunc represents a non-piecewise function that is not constrained by a domain.
func RegularFunc(fn string) []SubFuncDefn {
// RegFunc represents a regular function not split into different domain segments.
func RegFunc(fn string) []SubFuncDefn {
return []SubFuncDefn{{Fn: fn}}
}

Expand All @@ -113,7 +113,7 @@ func (p pfs) pf(row int) (*formula.Formula, error) {
//
// Example:
//
// fn := funcs.RegularFunc("sin((2*𝜋*x)/24)")
// fn := funcs.RegFunc("sin((2*𝜋*x)/24)")
// funcs.PiecewiseFunc(ctx, df, fn, 1)
//
func PiecewiseFunc(ctx context.Context, df *dataframe.DataFrame, fn PiecewiseFuncDefn, col interface{}, opts ...PiecewiseFuncOptions) error {
Expand Down

0 comments on commit eaa3a4e

Please sign in to comment.