diff --git a/consts.html b/consts.html index 6f501faab..7e9944908 100644 --- a/consts.html +++ b/consts.html @@ -36,7 +36,7 @@
This module provides a collection of physical constants in -
+This module provides functions for com -
+This module equips you with powerful f -
+This module provides functions f -
+This is a pure V module that provides easing functio -
+The fft
package is a wrapper of t
-
fn bessel_y1(x f64) f64
bessel_y1 returns the order-one Bessel function of the second kind.
special cases are: bessel_y1(+inf) = 0 bessel_y1(0) = -inf bessel_y1(x < 0) = nan bessel_y1(nan) = nan
@@ -236,7 +236,7 @@
fn bessel_yn(n_ int, x f64) f64
bessel_yn returns the order-n Bessel function of the second kind.
special cases are: bessel_yn(n, +inf) = 0 bessel_yn(n ≥ 0, 0) = -inf bessel_yn(n < 0, 0) = +inf if n is odd, -inf if n is even bessel_yn(n, x < 0) = nan bessel_yn(n, nan) = nan
@@ -324,7 +324,7 @@
fn erfc(x_ f64) f64
erfc returns the complementary error function of x.
special cases are: erfc(+inf) = 0 erfc(-inf) = 2 erfc(nan) = nan
@@ -484,7 +484,7 @@
fn pone(x f64) f64
For x >= 8, the asymptotic expansions of pone is 1 + 15/128 s2 - 4725/215 s4 - ..., where s = 1/x. We approximate pone by pone(x) = 1 + (R/S) where R = pr0 + pr1*s2 + pr2s**4 + ... + pr5s10 S = 1 + ps0*s2 + ... + ps4*s10 and | pone(x)-1-R/S | <= 2(-60.06)
@@ -524,7 +524,7 @@
fn pzero(x f64) f64
The asymptotic expansions of pzero is 1 - 9/128 s2 + 11025/98304 s4 - ..., where s = 1/x. For x >= 2, We approximate pzero by pzero(x) = 1 + (R/S) where R = pj0r0 + pR1s**2 + pR2s4 + ... + pR5*s10 S = 1 + pj0s0s**2 + ... + pS4s**10 and | pzero(x)-1-R/S | <= 2 ** ( -60.26)
@@ -532,7 +532,7 @@
fn qone(x f64) f64
For x >= 8, the asymptotic expansions of qone is 3/8 s - 105/1024 s3 - ..., where s = 1/x. We approximate qone by qone(x) = s*(0.375 + (R/S)) where R = qr1*s2 + qr2s**4 + ... + qr5s10 S = 1 + qs1*s2 + ... + qs6*s12 and | qone(x)/s -0.375-R/S | <= 2(-61.13)
@@ -540,7 +540,7 @@
fn qzero(x f64) f64
For x >= 8, the asymptotic expansions of qzero is -1/8 s + 75/1024 s3 - ..., where s = 1/x. We approximate pzero by qzero(x) = s*(-1.25 + (R/S)) where R = qj0r0 + qR1*s2 + qR2s**4 + ... + qR5s10 S = 1 + qj0s0*s2 + ... + qS5*s12 and | qzero(x)/s +1.25-R/S | <= 2(-61.22)
@@ -974,7 +974,7 @@This package provides some functio -
+This package implements algori -
+The functions described in this chapter will read or write data -
+len
numbers evenly spaced on
-
+
VSL aims to provide a robust set of too -
+This submodule offers tools for Nat -
+The mpi
-
This module aims to to implement noise algorithms.
It use
struct Generator {
mut:
- perm []int = rand.shuffle_clone(noise.permutations) or { panic(err) }
+ perm []int = rand.shuffle_clone(permutations) or { panic(err) }
}
Generator is a struct holding the permutation table used in perlin and simplex noise
@@ -255,7 +255,7 @@This module aims to to implement noise algorithms.
It use -
+This library implements high-level functions to generate plo -
+This chapter describes functions for evaluating and solving polynomials. There are routines for finding real and complex roots of quadratic and cubic equations using analytic methods. An iterative polynomial solver is also available for finding the roots of general polynomials with real coefficients (of any order). The functions are declared in the module vsl.poly
.
fn eval(c []f64, x f64) f64
The functions described here evaluate the polynomial
P(x) = c[0] + c[1] x + c[2] x^2 + . . . + c[len-1] x^(len-1)
using Horner's method for stability.
fn eval_derivs(c []f64, x f64, lenres u64) []f64
This function evaluates a polynomial and its derivatives, storing the results in the array res
of size lenres
. The output array contains the values of d^k P(x)/d x^k
for the specified value of x
, starting with k = 0
.
fn solve_quadratic(a f64, b f64, c f64) []f64
This function finds the real roots of the quadratic equation,
a x^2 + b x + c = 0
The number of real roots (either zero, one or two) is returned, and their locations are returned as [ x0, x1 ]
. If no real roots are found then []
is returned. If one real root is found (i.e. if a=0
) then it is returned as [ x0 ]
. When two real roots are found they are returned as [ x0, x1 ]
in ascending order. The case of coincident roots is not considered special. For example (x-1)^2=0
will have two roots, which happen to have exactly equal values.
The number of roots found depends on the sign of the discriminant b^2 - 4 a c
. This will be subject to rounding and cancellation errors when computed in double precision, and will also be subject to errors if the coefficients of the polynomial are inexact. These errors may cause a discrete change in the number of roots. However, for polynomials with small integer coefficients the discriminant can always be computed exactly.
fn solve_cubic(a f64, b f64, c f64) []f64
This function finds the real roots of the cubic equation,
x^3 + a x^2 + b x + c = 0
with a leading coefficient of unity. The number of real roots (either one or three) is returned, and their locations are returned as [ x0, x1, x2 ]
. If one real root is found then only [ x0 ]
is returned. When three real roots are found they are returned as [ x0, x1, x2 ]
in ascending order. The case of coincident roots is not considered special. For example, the equation (x-1)^3=0
will have three roots with exactly equal values. As in the quadratic case, finite precision may cause equal or closely-spaced real roots to move off the real axis into the complex plane, leading to a discrete change in the number of real roots.
fn companion_matrix(a []f64) [][]f64
Creates a companion matrix for the polynomial
P(x) = a_n * x^n + a_{n-1} * x^{n-1} + ... + a_1 * x + a_0
The companion matrix C
is defined as:
[0 0 0 ... 0 -a_0/a_n]
-[1 0 0 ... 0 -a_1/a_n]
-[0 1 0 ... 0 -a_2/a_n]
-[. . . ... . ........]
-[0 0 0 ... 1 -a_{n-1}/a_n]
fn balance_companion_matrix(cm [][]f64) [][]f64
Balances a companion matrix C
to improve numerical stability. It uses an iterative scaling process to make the row and column norms as close to each other as possible. The output is a balanced matrix B
such that D^(-1)CD = B
, where D
is a diagonal matrix.
fn add(a []f64, b []f64) []f64
Adds two polynomials:
(a_n * x^n + ... + a_0) + (b_m * x^m + ... + b_0)
Returns the result as [a_0 + b_0, a_1 + b_1, ..., a_k + b_k ...]
.
fn subtract(a []f64, b []f64) []f64
Subtracts two polynomials:
(a_n * x^n + ... + a_0) - (b_m * x^m + ... + b_0)
Returns the result as [a_0 - b_0, a_1 - b_1, ..., a_k - b_k, ...]
.
fn multiply(a []f64, b []f64) []f64
Multiplies two polynomials:
(a_n * x^n + ... + a_0) * (b_m * x^m + ... + b_0)
Returns the result as [c_0, c_1, ..., c_{n+m}]
where c_k = ∑_{i+j=k} a_i * b_j
.
fn divide(a []f64, b []f64) ([]f64, []f64)
Divides two polynomials:
(a_n * x^n + ... + a_0) / (b_m * x^m + ... + b_0)
Uses polynomial long division algorithm. Returns (q, r)
where q
is the quotient and r
is the remainder such that a(x) = b(x) * q(x) + r(x)
and degree(r) < degree(b)
.
This chapter describes functions for evaluating and solving polynomials. There are routines for finding real and complex roots of quadratic and cubic equations using analytic methods. An iterative polynomial solver is also available for finding the roots of general polynomials with real coefficients (of any order). The functions are declared in the module vsl.poly
.
fn eval(c []f64, x f64) f64
The functions described here evaluate the polynomial
P(x) = c[0] + c[1] x + c[2] x^2 + . . . + c[len-1] x^(len-1)
using Horner's method for stability.
fn eval_derivs(c []f64, x f64, lenres u64) []f64
This function evaluates a polynomial and its derivatives, storing the results in the array res
of size lenres
. The output array contains the values of d^k P(x)/d x^k
for the specified value of x
, starting with k = 0
.
fn solve_quadratic(a f64, b f64, c f64) []f64
This function finds the real roots of the quadratic equation,
a x^2 + b x + c = 0
The number of real roots (either zero, one or two) is returned, and their locations are returned as [ x0, x1 ]
. If no real roots are found then []
is returned. If one real root is found (i.e. if a=0
) then it is returned as [ x0 ]
. When two real roots are found they are returned as [ x0, x1 ]
in ascending order. The case of coincident roots is not considered special. For example (x-1)^2=0
will have two roots, which happen to have exactly equal values.
The number of roots found depends on the sign of the discriminant b^2 - 4 a c
. This will be subject to rounding and cancellation errors when computed in double precision, and will also be subject to errors if the coefficients of the polynomial are inexact. These errors may cause a discrete change in the number of roots. However, for polynomials with small integer coefficients the discriminant can always be computed exactly.
fn solve_cubic(a f64, b f64, c f64) []f64
This function finds the real roots of the cubic equation,
x^3 + a x^2 + b x + c = 0
with a leading coefficient of unity. The number of real roots (either one or three) is returned, and their locations are returned as [ x0, x1, x2 ]
. If one real root is found then only [ x0 ]
is returned. When three real roots are found they are returned as [ x0, x1, x2 ]
in ascending order. The case of coincident roots is not considered special. For example, the equation (x-1)^3=0
will have three roots with exactly equal values. As in the quadratic case, finite precision may cause equal or closely-spaced real roots to move off the real axis into the complex plane, leading to a discrete change in the number of real roots.
fn companion_matrix(a []f64) [][]f64
Creates a companion matrix for the polynomial
P(x) = a_n * x^n + a_{n-1} * x^{n-1} + ... + a_1 * x + a_0
The companion matrix C
is defined as:
[0 0 0 ... 0 -a_0/a_n]
+[1 0 0 ... 0 -a_1/a_n]
+[0 1 0 ... 0 -a_2/a_n]
+[. . . ... . ........]
+[0 0 0 ... 1 -a_{n-1}/a_n]
+
fn balance_companion_matrix(cm [][]f64) [][]f64
Balances a companion matrix C
to improve numerical stability. It uses an iterative scaling process to make the row and column norms as close to each other as possible. The output is a balanced matrix B
such that D^(-1)CD = B
, where D
is a diagonal matrix.
fn add(a []f64, b []f64) []f64
Adds two polynomials:
(a_n * x^n + ... + a_0) + (b_m * x^m + ... + b_0)
Returns the result as [a_0 + b_0, a_1 + b_1, ..., a_k + b_k ...]
.
fn subtract(a []f64, b []f64) []f64
Subtracts two polynomials:
(a_n * x^n + ... + a_0) - (b_m * x^m + ... + b_0)
Returns the result as [a_0 - b_0, a_1 - b_1, ..., a_k - b_k, ...]
.
fn multiply(a []f64, b []f64) []f64
Multiplies two polynomials:
(a_n * x^n + ... + a_0) * (b_m * x^m + ... + b_0)
Returns the result as [c_0, c_1, ..., c_{n+m}]
where c_k = ∑_{i+j=k} a_i * b_j
.
fn divide(a []f64, b []f64) ([]f64, []f64)
Divides two polynomials:
(a_n * x^n + ... + a_0) / (b_m * x^m + ... + b_0)
Uses polynomial long division algorithm. Returns (q, r)
where q
is the quotient and r
is the remainder such that a(x) = b(x) * q(x) + r(x)
and degree(r) < degree(b)
.
This chapter describes functions for evaluating and solvi -
+The functions provided by this module add support for qua -
+The module vsl.roots
contai
-
VCL is a high level way of writing programs with
VCL is a high level way of writing programs with
from_image creates new Image and copies data from Image VCL is a high level way of writing programs with
image allocates an image buffer VCL is a high level way of writing programs with
VCL is a high level way of writing programs with
release releases the buffer on the device VCL is a high level way of writing programs with
VCL is a high level way of writing programs with
VCL is a high level way of writing programs with
interface IImage #
interface IImage #
interface IImage {
width int
@@ -468,7 +468,7 @@
V Computing Language
fn (Device) from_image #
fn (Device) from_image #
fn (d &Device) from_image(img IImage) !&Image
V Computing Language
fn (Device) image #
fn (Device) image #
fn (d &Device) image(@type ImageChannelOrder, bounds Rect) !&Image
V Computing Language
struct Image #
struct Image #
struct Image {
format ClImageFormat
@@ -573,7 +573,7 @@
V Computing Language
fn (Image) release #
fn (Image) release #
fn (mut img Image) release() !
V Computing Language
fn (Image) data #
fn (Image) data #
@@ -651,7 +651,8 @@ fn (image &Image) data() !IImage
V Computing Language
struct Rect {
-pub: // pixel need integers
+pub:
+ // pixel need integers
x f32
y f32
width f32
@@ -694,7 +695,7 @@
V Computing Language
This package implements BLAS and LAPACKE func -
+