Skip to content

Commit

Permalink
Merge branch 'main' of github.com:vlang/vsl into feature/new-lapack
Browse files Browse the repository at this point in the history
* 'main' of github.com:vlang/vsl:
  Run CI again
  Add more missing `pub` modifiers to public struct fields
  Add `pub` access modifier to publicly used struct fields (#200)
  • Loading branch information
ulises-jeremias committed Apr 27, 2024
2 parents 2a2e7d8 + 31c10b2 commit e82bda8
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions func/func.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions iter/ranges.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub:

@[params]
pub struct IntIterParams {
pub:
start i64
stop i64 @[required]
step i64 = 1
Expand Down Expand Up @@ -71,6 +72,7 @@ pub:

@[params]
pub struct FloatIterParams {
pub:
start f64
stop f64 @[required]
step f64 = 1.0
Expand Down Expand Up @@ -126,6 +128,7 @@ pub:

@[params]
pub struct LinearIterParams {
pub:
start f64 @[required]
stop f64 @[required]
len i64 = 50
Expand Down
1 change: 1 addition & 0 deletions ml/kmeans.v
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ pub fn (mut o Kmeans) compute_centroids() {
}

pub struct TrainConfig {
pub:
epochs int
tol_norm_change f64
}
Expand Down
2 changes: 1 addition & 1 deletion ml/knn.v
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ pub fn (mut knn KNN) train() {

// data needed for KNN.predict
pub struct PredictConfig {
pub:
max_iter int
k int
mut:
to_pred []f64
}

Expand Down
1 change: 1 addition & 0 deletions plot/show.v
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions roots/bisection.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions util/util.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub fn arange(n int) []int {

@[params]
pub struct RangeStep {
pub:
step int = 1
}

Expand Down

0 comments on commit e82bda8

Please sign in to comment.