Skip to content

Commit 7c55411

Browse files
committed
run v fmt -w . again
1 parent 665fa11 commit 7c55411

File tree

10 files changed

+80
-80
lines changed

10 files changed

+80
-80
lines changed

errors/errno.v

+34-34
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,73 @@ module errors
22

33
pub enum ErrorCode {
44
// success
5-
success = 0
5+
success = 0
66
// generic failure
7-
failure = -1
7+
failure = -1
88
// iteration has not converged
99
can_continue = -2
1010
// input domain error, e.g sqrt(-1)
11-
edom = 1
11+
edom = 1
1212
// output range error, e.g. exp(1e+100)
13-
erange = 2
13+
erange = 2
1414
// invalid pointer
15-
efault = 3
15+
efault = 3
1616
// invalid argument supplied by user
17-
einval = 4
17+
einval = 4
1818
// generic failure
19-
efailed = 5
19+
efailed = 5
2020
// factorization failed
21-
efactor = 6
21+
efactor = 6
2222
// sanity check failed - shouldn't happen
23-
esanity = 7
23+
esanity = 7
2424
// malloc failed
25-
enomem = 8
25+
enomem = 8
2626
// problem with user-supplied function
27-
ebadfunc = 9
27+
ebadfunc = 9
2828
// iterative process is out of control
29-
erunaway = 10
29+
erunaway = 10
3030
// exceeded max number of iterations
31-
emaxiter = 11
31+
emaxiter = 11
3232
// tried to divide by zero
33-
ezerodiv = 12
33+
ezerodiv = 12
3434
// user specified an invalid tolerance
35-
ebadtol = 13
35+
ebadtol = 13
3636
// failed to reach the specified tolerance
37-
etol = 14
37+
etol = 14
3838
// underflow
39-
eundrflw = 15
39+
eundrflw = 15
4040
// overflow
41-
eovrflw = 16
41+
eovrflw = 16
4242
// loss of accuracy
43-
eloss = 17
43+
eloss = 17
4444
// failed because of roundoff error
45-
eround = 18
45+
eround = 18
4646
// matrix, vector lengths are not conformant
47-
ebadlen = 19
47+
ebadlen = 19
4848
// matrix not square
49-
enotsqr = 20
49+
enotsqr = 20
5050
// apparent singularity detected
51-
esing = 21
51+
esing = 21
5252
// integral or series is divergent
53-
ediverge = 22
53+
ediverge = 22
5454
// requested feature is not supported by the hardware
55-
eunsup = 23
55+
eunsup = 23
5656
// requested feature not (yet) implemented
57-
eunimpl = 24
57+
eunimpl = 24
5858
// cache limit exceeded
59-
ecache = 25
59+
ecache = 25
6060
// table limit exceeded
61-
etable = 26
61+
etable = 26
6262
// iteration is not making progress towards solution
63-
enoprog = 27
63+
enoprog = 27
6464
// jacobian evaluations are not improving the solution
65-
enoprogj = 28
65+
enoprogj = 28
6666
// cannot reach the specified tolerance in F
67-
etolf = 29
67+
etolf = 29
6868
// cannot reach the specified tolerance in X
69-
etolx = 30
69+
etolx = 30
7070
// cannot reach the specified tolerance in gradient
71-
etolg = 31
71+
etolg = 31
7272
// end of file
73-
eof = 32
73+
eof = 32
7474
}

gm/bins.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub mut:
1818
@[heap]
1919
pub struct Bin {
2020
pub mut:
21-
index int // index of bin
21+
index int // index of bin
2222
entries []&BinEntry // entries
2323
}
2424

iter/ranges.v

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ pub:
129129
@[params]
130130
pub struct LinearIterParams {
131131
pub:
132-
start f64 @[required]
133-
stop f64 @[required]
132+
start f64 @[required]
133+
stop f64 @[required]
134134
len i64 = 50
135135
endpoint bool = true
136136
}
@@ -193,8 +193,8 @@ mut:
193193

194194
@[params]
195195
pub struct LogIterParams {
196-
start f64 @[required]
197-
stop f64 @[required]
196+
start f64 @[required]
197+
stop f64 @[required]
198198
len i64 = 50
199199
base f64 = 10.0
200200
endpoint bool = true

la/sparse_config.v

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import vsl.mpi
77
pub struct SparseConfig {
88
mut:
99
communicator ?&mpi.Communicator // MPI communicator for parallel solvers [may be none]
10-
mumps_ordering int // ICNTL(7) default = "" == "auto"
11-
mumps_scaling int // Scaling type (check MUMPS solver) [may be empty]
12-
symmetric bool // indicates symmetric system. NOTE: when using MUMPS, only the upper or lower part of the matrix must be provided
13-
sym_pos_def bool // indicates symmetric-positive-defined system. NOTE: when using MUMPS, only the upper or lower part of the matrix must be provided
10+
mumps_ordering int // ICNTL(7) default = "" == "auto"
11+
mumps_scaling int // Scaling type (check MUMPS solver) [may be empty]
12+
symmetric bool // indicates symmetric system. NOTE: when using MUMPS, only the upper or lower part of the matrix must be provided
13+
sym_pos_def bool // indicates symmetric-positive-defined system. NOTE: when using MUMPS, only the upper or lower part of the matrix must be provided
1414
pub mut:
1515
verbose bool // run on verbose mode
1616
mumps_increase_of_working_space_pct int // MUMPS control parameters (check MUMPS solver manual) ICNTL(14) default = 100%

ml/data.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub mut:
2626
nb_samples int // number of data points (samples). number of rows in x and y
2727
nb_features int // number of features. number of columns in x
2828
x &la.Matrix[T] = unsafe { nil } // [nb_samples][nb_features] x values
29-
y []T // [nb_samples] y values [optional]
29+
y []T // [nb_samples] y values [optional]
3030
}
3131

3232
// Data.new returns a new object to hold ML data

ml/kmeans.v

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import vsl.plot
99
@[heap]
1010
pub struct Kmeans {
1111
mut:
12-
name string // name of this "observer"
12+
name string // name of this "observer"
1313
data &Data[f64] = unsafe { nil } // x data
1414
stat &Stat[f64] = unsafe { nil } // statistics about x (data)
15-
nb_classes int // expected number of classes
15+
nb_classes int // expected number of classes
1616
bins &gm.Bins = unsafe { nil } // "bins" to speed up searching for data points given their coordinates (2D or 3D only at the moment)
17-
nb_iter int // number of iterations
17+
nb_iter int // number of iterations
1818
pub mut:
1919
classes []int // [nb_samples] indices of classes of each sample
2020
centroids [][]f64 // [nb_classes][nb_features] coordinates of centroids

ml/linreg.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import vsl.util
99
pub struct LinReg {
1010
mut:
1111
// main
12-
name string // name of this "observer"
12+
name string // name of this "observer"
1313
data &Data[f64] = unsafe { nil } // x-y data
1414
// workspace
1515
e []f64 // vector e = b⋅o + x⋅theta - y [nb_samples]

ml/workspace.v

+13-13
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ import vsl.la
1212
pub struct Stat[T] {
1313
pub mut:
1414
data &Data[T] = unsafe { nil } // data
15-
name string // name of this object
16-
min_x []T // [n_features] min x values
17-
max_x []T // [n_features] max x values
18-
sum_x []T // [n_features] sum of x values
19-
mean_x []T // [n_features] mean of x values
20-
sig_x []T // [n_features] standard deviations of x
21-
del_x []T // [n_features] difference: max(x) - min(x)
22-
min_y T // min of y values
23-
max_y T // max of y values
24-
sum_y T // sum of y values
25-
mean_y T // mean of y values
26-
sig_y T // standard deviation of y
27-
del_y T // difference: max(y) - min(y)
15+
name string // name of this object
16+
min_x []T // [n_features] min x values
17+
max_x []T // [n_features] max x values
18+
sum_x []T // [n_features] sum of x values
19+
mean_x []T // [n_features] mean of x values
20+
sig_x []T // [n_features] standard deviations of x
21+
del_x []T // [n_features] difference: max(x) - min(x)
22+
min_y T // min of y values
23+
max_y T // max of y values
24+
sum_y T // sum of y values
25+
mean_y T // mean of y values
26+
sig_y T // standard deviation of y
27+
del_y T // difference: max(y) - min(y)
2828
}
2929

3030
// stat returns a new Stat object

plot/axis.v

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ pub struct Axis {
55
pub mut:
66
title AxisTitle
77
tickmode string = 'auto'
8-
tick0 f64 @[omitempty]
9-
dtick f64 @[omitempty]
10-
tickvals []f64 @[omitempty]
11-
ticktext []string @[omitempty]
12-
range []f64 @[omitempty]
8+
tick0 f64 @[omitempty]
9+
dtick f64 @[omitempty]
10+
tickvals []f64 @[omitempty]
11+
ticktext []string @[omitempty]
12+
range []f64 @[omitempty]
1313
}
1414

1515
// AxisTitle handles needed data to render an axis title

plot/trace.v

+14-14
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ pub struct CommonTrace {
2626
pub mut:
2727
x XType
2828
xbins map[string]f32
29-
y YType @[omitempty]
30-
z ZType @[omitempty]
31-
name string @[omitempty]
32-
mode string @[omitempty]
33-
marker Marker @[omitempty]
34-
line Line @[omitempty]
35-
pull []f64 @[omitempty]
36-
hole f64 @[omitempty]
37-
fill string @[omitempty]
38-
fillcolor string @[omitempty]
39-
customdata [][]string @[omitempty]
40-
colorscale string = 'Viridis' @[omitempty]
41-
textinfo string @[omitempty]
42-
text []string @[omitempty]
29+
y YType @[omitempty]
30+
z ZType @[omitempty]
31+
name string @[omitempty]
32+
mode string @[omitempty]
33+
marker Marker @[omitempty]
34+
line Line @[omitempty]
35+
pull []f64 @[omitempty]
36+
hole f64 @[omitempty]
37+
fill string @[omitempty]
38+
fillcolor string @[omitempty]
39+
customdata [][]string @[omitempty]
40+
colorscale string = 'Viridis' @[omitempty]
41+
textinfo string @[omitempty]
42+
text []string @[omitempty]
4343
}
4444

4545
// ScatterTrace is a struct for Scatter trace type

0 commit comments

Comments
 (0)