diff --git a/func/func.v b/func/func.v index 537281c1a..540eb4ed1 100644 --- a/func/func.v +++ b/func/func.v @@ -13,6 +13,7 @@ pub type VectorValuedFn = fn (x f64, y []f64, params []f64) f64 // Definition of an arbitrary function with parameters pub struct Fn { +pub: f ArbitraryFn @[required] mut: params []f64 @@ -46,6 +47,7 @@ pub fn (f Fn) safe_eval(x f64) !f64 { // Definition of an arbitrary function returning two values, r1, r2 pub struct FnFdf { +pub: f ?ArbitraryFn df ?DfFn fdf ?FdfFn diff --git a/iter/ranges.v b/iter/ranges.v index 6e198dbba..23f28096c 100644 --- a/iter/ranges.v +++ b/iter/ranges.v @@ -15,6 +15,7 @@ pub: @[params] pub struct IntIterParams { +pub: start i64 stop i64 @[required] step i64 = 1 @@ -71,6 +72,7 @@ pub: @[params] pub struct FloatIterParams { +pub: start f64 stop f64 @[required] step f64 = 1.0 @@ -126,6 +128,7 @@ pub: @[params] pub struct LinearIterParams { +pub: start f64 @[required] stop f64 @[required] len i64 = 50 diff --git a/plot/show.v b/plot/show.v index d0704856a..fd676540a 100644 --- a/plot/show.v +++ b/plot/show.v @@ -12,6 +12,7 @@ import time @[params] pub struct PlotConfig { net.ListenOptions +pub: timeout time.Duration = 1 * time.second use_cdn bool saddr string = ':0' diff --git a/roots/bisection.v b/roots/bisection.v index bf566a40d..d2ed220fe 100644 --- a/roots/bisection.v +++ b/roots/bisection.v @@ -21,6 +21,7 @@ pub mut: // BisectionParams contains the parameters for the bisection method @[params] pub struct BisectionParams { +pub: xmin f64 xmax f64 epsrel f64 = 1e-6 diff --git a/util/util.v b/util/util.v index f986650fb..d59df9d6f 100644 --- a/util/util.v +++ b/util/util.v @@ -11,6 +11,7 @@ pub fn arange(n int) []int { @[params] pub struct RangeStep { +pub: step int = 1 }