Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KaisenAmin/c_std
/ functions
Functions
2,651 in github.com/KaisenAmin/c_std
⨍
Functions
2,651
◇
Types & classes
138
Function
matrix_argmin_axis
* @brief Returns the per-axis index of the minimum element. * * The C analogue of NumPy's `numpy.argmin(M, axis=...)`: `axis == 0` returns, for * e
matrix/matrix.c:10035
Function
matrix_argsort
* @brief Returns the indices that would sort a matrix along one axis. * * The C analogue of NumPy's `numpy.argsort(M, axis=...)`: for each row * (`
matrix/matrix.c:3867
Function
matrix_around
* @brief Rounds every element to a given number of decimal places. * * The C analogue of NumPy's `numpy.around(x, decimals)`: scales by * `10**deci
matrix/matrix.c:10727
Function
matrix_array_equal
* @brief Tests whether two matrices are exactly equal. * * The C analogue of NumPy's `numpy.array_equal(a, b)` (with the default * `equal_nan=False
matrix/matrix.c:11547
Function
matrix_atleast_2d
* @brief Ensures a vector is represented as an explicit row matrix. * * The C analogue of NumPy's `numpy.atleast_2d(x)`: a row or column vector is
matrix/matrix.c:12560
Function
matrix_average
* @brief Computes the weighted average of all elements of a matrix. * * The C analogue of NumPy's `numpy.average(M, weights=W)`: returns * `sum(M *
matrix/matrix.c:7956
Function
matrix_bincount
* @brief Counts occurrences of each non-negative integer. * * The C analogue of NumPy's `numpy.bincount(x)`: treats the (flattened) elements * of `
matrix/matrix.c:10591
Function
matrix_block_diag
* @brief Creates a block diagonal matrix from a variable number of matrices. * * This function constructs a block diagonal matrix by placing each pr
matrix/matrix.c:9685
Function
matrix_cbrt
* @brief Computes the element-wise cube root of a matrix. * * The C analogue of NumPy's `numpy.cbrt(M)`: every element becomes its real cube * root
matrix/matrix.c:1335
Function
matrix_ceil
* @brief Computes the element-wise ceiling of a matrix. * * The C analogue of NumPy's `numpy.ceil(M)`: each element becomes the smallest * integer
matrix/matrix.c:1022
Function
matrix_circulant
* @brief Creates a circulant matrix from the first row of a given matrix. * * A circulant matrix is a special type of Toeplitz matrix where each row
matrix/matrix.c:5877
Function
matrix_clip
* @brief Clamps every element of a matrix to the interval `[min_val, max_val]`. * * The C analogue of NumPy's `numpy.clip(M, min_val, max_val)`: eac
matrix/matrix.c:908
Function
matrix_cofactor
* @brief Computes the cofactor matrix of a given square matrix. * * This function calculates the cofactor matrix for a given square matrix. * Each
matrix/matrix.c:6004
Function
matrix_col_addition
* @brief Adds one column of a matrix to another, optionally scaling the source column before adding. * * This function adds the elements of the `sou
matrix/matrix.c:9413
Function
matrix_column_stack
* @brief Stacks two 1-D vectors as the columns of a 2-D matrix. * * The C analogue of NumPy's `numpy.column_stack((a, b))` for 1-D inputs: given *
matrix/matrix.c:10511
Function
matrix_companion
* @brief Generates a companion matrix from the given polynomial coefficients. * * @param coefficients A matrix representing the polynomial coefficie
matrix/matrix.c:6626
Function
matrix_cond
* @brief Computes the 2-norm condition number of a matrix. * * The C analogue of NumPy's `numpy.linalg.cond(M)` with the default 2-norm: the * rati
matrix/matrix.c:4820
Function
matrix_convolve
* @brief Computes the full discrete linear convolution of two 1-D sequences. * * The C analogue of NumPy's `numpy.convolve(a, v)` with the default
matrix/matrix.c:4373
Function
matrix_copysign
* @brief Element-wise copy of magnitude from `x` and sign from `y`. * * The C analogue of NumPy's `numpy.copysign(x, y)`: each element takes the *
matrix/matrix.c:1817
Function
matrix_corrcoef
* @brief Computes the Pearson correlation-coefficient matrix. * * The C analogue of NumPy's `numpy.corrcoef(M)` with the default `rowvar=True`: * e
matrix/matrix.c:4322
Function
matrix_cos
* @brief Computes the element-wise cosine of a matrix. * * The C analogue of NumPy's `numpy.cos(M)`: every element becomes `cos(x)` (with * `x` in
matrix/matrix.c:1230
Function
matrix_cosh
* @brief Computes the element-wise hyperbolic cosine of a matrix. * * The C analogue of NumPy's `numpy.cosh(M)`: every element becomes `cosh(x)`. *
matrix/matrix.c:1599
Function
matrix_count_nonzero
* @brief Counts the number of non-zero elements in a matrix. * * The C analogue of NumPy's `numpy.count_nonzero(M)`: returns how many elements * ar
matrix/matrix.c:7362
Function
matrix_count_nonzero_axis
* @brief Counts non-zero elements along an axis. * * The C analogue of NumPy's `numpy.count_nonzero(M, axis=...)`: `axis == 0` * counts down each c
matrix/matrix.c:10186
Function
matrix_cross
* @brief Computes the cross product of two 3-element vectors. * * The C analogue of NumPy's `numpy.cross(a, b)` for 3-D vectors: returns the * vect
matrix/matrix.c:4205
Function
matrix_cummax
* @brief Running maximum of all elements in row-major (C) order. * * The C analogue of NumPy's `numpy.maximum.accumulate(M.flatten())`: the matrix
matrix/matrix.c:7644
Function
matrix_cummax_axis
* @brief Running maximum along one axis. * * The C analogue of NumPy's `numpy.maximum.accumulate(M, axis=...)`. The result * has the same shape as
matrix/matrix.c:7685
Function
matrix_cummin
* @brief Running minimum of all elements in row-major (C) order. * * The C analogue of NumPy's `numpy.minimum.accumulate(M.flatten())`: the matrix
matrix/matrix.c:7747
Function
matrix_cummin_axis
* @brief Running minimum along one axis. * * The C analogue of NumPy's `numpy.minimum.accumulate(M, axis=...)`. The result * has the same shape as
matrix/matrix.c:7788
Function
matrix_cumprod
* @brief Cumulative product of all elements in row-major (C) order. * * The C analogue of NumPy's `numpy.cumprod(M)` with the default `axis=None`: t
matrix/matrix.c:7550
Function
matrix_cumprod_axis
* @brief Cumulative product along one axis. * * The C analogue of NumPy's `numpy.cumprod(M, axis=...)`. The result has the same * shape as the inpu
matrix/matrix.c:7588
Function
matrix_cumsum
* @brief Cumulative sum of all elements in row-major (C) order. * * The C analogue of NumPy's `numpy.cumsum(M)` with the default `axis=None`: the *
matrix/matrix.c:7395
Function
matrix_cumsum_axis
* @brief Cumulative sum along one axis. * * The C analogue of NumPy's `numpy.cumsum(M, axis=...)`. The result has the same * shape as the input: *
matrix/matrix.c:7437
Function
matrix_deg2rad
* @brief Converts a matrix of degrees to radians, element-wise. * * The C analogue of NumPy's `numpy.deg2rad(M)`: every element is multiplied by *
matrix/matrix.c:1656
Function
matrix_delete
* @brief Removes a single row or column from a matrix. * * The C analogue of NumPy's `numpy.delete(M, index, axis=...)`: `axis == 0` * removes row
matrix/matrix.c:10364
Function
matrix_describe
* @brief Produces a per-column summary of descriptive statistics. * * The C analogue of pandas' `DataFrame.describe()`: for each column (variable),
matrix/matrix.c:8750
Function
matrix_diag
* @brief Builds a square diagonal matrix from a vector. * * The C analogue of the constructor form of NumPy's `numpy.diag(v)`: given a * 1-D vector
matrix/matrix.c:2662
Function
matrix_diagonal
* @brief Extracts the k-th diagonal of a matrix as a row vector. * * The C analogue of NumPy's `numpy.diagonal(M, offset=k)`: returns the elements
matrix/matrix.c:8000
Function
matrix_diff
* @brief Computes the first discrete difference along one axis. * * The C analogue of NumPy's `numpy.diff(M, axis=...)` (first order, `n = 1`): * e
matrix/matrix.c:4042
Function
matrix_digitize
* @brief Returns the indices of the bins to which each value belongs. * * The C analogue of NumPy's `numpy.digitize(x, bins)` with the default * `r
matrix/matrix.c:10548
Function
matrix_divide
* @brief Computes the element-wise (Hadamard) division of two matrices. * * The C analogue of NumPy's `numpy.divide(A, B)` (i.e. `A / B`): every ele
matrix/matrix.c:747
Function
matrix_divmod
* @brief Computes the simultaneous element-wise quotient and remainder. * * The C analogue of NumPy's `numpy.divmod(a, b)`: for each pair it returns
matrix/matrix.c:11028
Function
matrix_dot
* @brief Computes the inner product of two vectors. * * The C analogue of NumPy's `numpy.dot(a, b)` for one-dimensional inputs: the * scalar inner
matrix/matrix.c:12435
Function
matrix_ediff1d
* @brief Computes the differences between consecutive flattened elements. * * The C analogue of NumPy's `numpy.ediff1d(x)`: flattens the matrix in r
matrix/matrix.c:11792
Function
matrix_eig
* @brief Computes the eigenvalues and eigenvectors of a symmetric matrix. * * The C analogue of NumPy's `numpy.linalg.eig` for a real **symmetric**
matrix/matrix.c:4522
Function
matrix_equal_elementwise
* @brief Computes the element-wise equality mask. * * The C analogue of NumPy's `numpy.equal(a, b)`: returns `1.0` wherever the * corresponding ele
matrix/matrix.c:11424
Function
matrix_exp
* @brief Computes the element-wise exponential of a matrix. * * The C analogue of NumPy's `numpy.exp(M)`: every element becomes `e^x`. The * input
matrix/matrix.c:1090
Function
matrix_exp2
* @brief Computes the element-wise base-2 exponential of a matrix. * * The C analogue of NumPy's `numpy.exp2(M)`: every element becomes `2^x`. The
matrix/matrix.c:1398
Function
matrix_expit
* @brief Computes the element-wise logistic sigmoid. * * The C analogue of SciPy's `scipy.special.expit(x)`: `1 / (1 + exp(-x))`, * element-wise, m
matrix/matrix.c:11220
Function
matrix_expm
* @brief Computes the matrix exponential e^A. * * The C analogue of SciPy's `scipy.linalg.expm(A)`, using the scaling-and-squaring * method with a
matrix/matrix.c:9194
Function
matrix_expm1
* @brief Computes the element-wise `e^x - 1` of a matrix. * * The C analogue of NumPy's `numpy.expm1(M)`: every element becomes `e^x - 1`, * comput
matrix/matrix.c:1426
Function
matrix_exprel
* @brief Computes the relative exponential of every element. * * The C analogue of SciPy's `scipy.special.exprel(x)`: `(exp(x) - 1) / x`, with * th
matrix/matrix.c:10757
Function
matrix_extract
* @brief Extracts the elements selected by a non-zero condition mask. * * The C analogue of NumPy's `numpy.extract(condition, arr)`: returns a `1 x
matrix/matrix.c:11871
Function
matrix_eye
* @brief Creates a 2-D matrix with ones on a diagonal and zeros elsewhere. * * The C analogue of NumPy's `numpy.eye(N, M, k)`: returns a `rows x col
matrix/matrix.c:2623
Function
matrix_fftfreq
* @brief Returns the DFT sample frequencies. * * The C analogue of NumPy's `numpy.fft.fftfreq(n, d)`: a `1 x n` row vector of * the frequency bins
matrix/matrix.c:12596
Function
matrix_fiedler
* @brief Creates a Fiedler matrix from a given matrix. * * This function generates a Fiedler matrix, which is a symmetric matrix where each element
matrix/matrix.c:9491
Function
matrix_fill_diagonal
* @brief Fills the main diagonal of a matrix in place with a constant value. * * The C analogue of NumPy's `numpy.fill_diagonal(M, value)`: sets `M[
matrix/matrix.c:8055
Function
matrix_fillna
* @brief Replaces every NaN in a matrix with a constant value. * * The C analogue of pandas' `DataFrame.fillna(value)`: each `NaN` element becomes
matrix/matrix.c:8709
Function
matrix_fix
* @brief Rounds every element toward zero to the nearest integer. * * The C analogue of NumPy's `numpy.fix(x)`: truncates toward zero (floor for *
matrix/matrix.c:11099
Function
matrix_flatnonzero
* @brief Returns the flattened indices of the non-zero elements. * * The C analogue of NumPy's `numpy.flatnonzero(x)`: scans the matrix in row-major
matrix/matrix.c:11828
Function
matrix_flip
* @brief Reverses the order of elements along one axis. * * The C analogue of NumPy's `numpy.flip(M, axis=...)`: `axis == 0` reverses the * row ord
matrix/matrix.c:10276
Function
matrix_fliplr
* @brief Reverses the column order of a matrix (flip left-right). * * The C analogue of NumPy's `numpy.fliplr(M)`: the columns are reversed so the
matrix/matrix.c:3151
Function
matrix_flipud
* @brief Reverses the row order of a matrix (flip up-down). * * The C analogue of NumPy's `numpy.flipud(M)`: the rows are reversed so the * first r
matrix/matrix.c:3113
Function
matrix_float_power
* @brief Computes the element-wise power in floating point. * * The C analogue of NumPy's `numpy.float_power(a, b)`: `a ** b` computed in * double
matrix/matrix.c:11192
Function
matrix_floor
* @brief Computes the element-wise floor of a matrix. * * The C analogue of NumPy's `numpy.floor(M)`: each element becomes the largest * integer va
matrix/matrix.c:987
Function
matrix_floor_divide
* @brief Computes the element-wise floor of the division. * * The C analogue of NumPy's `numpy.floor_divide(a, b)`: `floor(a / b)`, * element-wise.
matrix/matrix.c:11070
Function
matrix_fmax
* @brief Element-wise NaN-ignoring maximum of two matrices. * * The C analogue of NumPy's `numpy.fmax(a, b)`: returns the larger of each pair, * bu
matrix/matrix.c:10919
Function
matrix_fmin
* @brief Element-wise NaN-ignoring minimum of two matrices. * * The C analogue of NumPy's `numpy.fmin(a, b)`: returns the smaller of each * pair, b
matrix/matrix.c:10952
Function
matrix_fmod
* @brief Element-wise C-style floating-point remainder of two matrices. * * The C analogue of NumPy's `numpy.fmod(x, y)`: each element is the remain
matrix/matrix.c:1856
Function
matrix_frobenius_norm
* @brief Computes the Frobenius norm of a matrix. * * The Frobenius norm is calculated as the square root of the sum of the absolute squares of all
matrix/matrix.c:6310
Function
matrix_from_array
* @brief Creates a matrix from a given array of doubles. * * This function takes a 1D array of doubles and arranges it into a matrix of the specifie
matrix/matrix.c:5802
Function
matrix_gcd
* @brief Computes the element-wise greatest common divisor. * * The C analogue of NumPy's `numpy.gcd(a, b)`: each element is treated as an * intege
matrix/matrix.c:10799
Function
matrix_geomspace
* @brief Builds a row vector spaced evenly on a geometric progression. * * The C analogue of NumPy's `numpy.geomspace(start, stop, num)`: `num` samp
matrix/matrix.c:12257
Function
matrix_get_col
* @brief Extracts a specific column from a matrix and returns it as a new matrix. * * This function creates a new matrix containing the elements of
matrix/matrix.c:9611
Function
matrix_get_main_diagonal_as_column
* @brief Extracts the main diagonal of a square matrix and returns it as a column matrix. * * This function creates a new Nx1 matrix (where N is the
matrix/matrix.c:2871
Function
matrix_get_main_diagonal_as_row
* @brief Extracts the main diagonal of a square matrix and returns it as a row matrix. * * This function creates a new 1xN matrix (where N is the nu
matrix/matrix.c:2910
Function
matrix_get_minor_diagonal_as_column
* @brief Extracts the minor diagonal of a square matrix and returns it as a column matrix. * * This function creates a new Nx1 matrix (where N is th
matrix/matrix.c:2988
Function
matrix_get_minor_diagonal_as_row
* @brief Extracts the minor diagonal of a square matrix and returns it as a row matrix. * * This function creates a new 1xN matrix (where N is the n
matrix/matrix.c:2949
Function
matrix_get_row
* @brief Extracts a specific row from a matrix and returns it as a new matrix. * * This function creates a new matrix containing the elements of the
matrix/matrix.c:9571
Function
matrix_gmean
* @brief Computes the geometric mean of all elements. * * The C analogue of SciPy's `scipy.stats.gmean(x)`: `exp(mean(log(x)))`, the * `n`-th root
matrix/matrix.c:12090
Function
matrix_greater
* @brief Element-wise "greater than" comparison of two matrices. * * The C analogue of NumPy's `numpy.greater(A, B)` (`A > B`): each element becomes
matrix/matrix.c:2124
Function
matrix_greater_equal
* @brief Element-wise "greater than or equal" comparison of two matrices. * * The C analogue of NumPy's `numpy.greater_equal(A, B)` (`A >= B`): each
matrix/matrix.c:2163
Function
matrix_hadamard_product
* @brief Computes the element-wise (Hadamard) product of two matrices. * * Multiplies @p A and @p B entry by entry: `C[i][j] = A[i][j] * B[i][j]`.
matrix/matrix.c:9872
Function
matrix_hamming
* @brief Builds a Hamming window. * * The C analogue of NumPy's `numpy.hamming(M)`: a `1 x M` row vector of the * Hamming window `0.54 - 0.46*cos(2
matrix/matrix.c:12700
Function
matrix_hankel
* @brief Generates a Hankel matrix from the first row and last column vectors. * * A Hankel matrix is a square matrix in which each ascending skew-d
matrix/matrix.c:5660
Function
matrix_hanning
* @brief Builds a Hann (Hanning) window. * * The C analogue of NumPy's `numpy.hanning(M)`: a `1 x M` row vector of the Hann * window `0.5 - 0.5*cos
matrix/matrix.c:12664
Function
matrix_heaviside
* @brief Computes the element-wise Heaviside step function. * * The C analogue of NumPy's `numpy.heaviside(x, h0)`: `0` where `x < 0`, `1` * where
matrix/matrix.c:11312
Function
matrix_helmert
* @brief Creates a Helmert matrix of the specified size. * * A Helmert matrix is an orthogonal matrix used in statistical analysis. This function ge
matrix/matrix.c:5958
Function
matrix_hilbert
* @brief Creates a Hilbert matrix of the given size. * * A Hilbert matrix is a square matrix with entries being the unit fractions: * H(i, j) = 1 /
matrix/matrix.c:5915
Function
matrix_histogram
* @brief Computes the histogram of a set of values. * * The C analogue of NumPy's `numpy.histogram(x, bins)`: divides the range * `[min(x), max(x)]
matrix/matrix.c:10633
Function
matrix_hypot
* @brief Element-wise Euclidean hypotenuse of two matrices. * * The C analogue of NumPy's `numpy.hypot(x, y)`: each element is * `sqrt(x*x + y*y)`,
matrix/matrix.c:1781
Function
matrix_insert
* @brief Inserts a row or column at a given position. * * The C analogue of NumPy's `numpy.insert(M, index, values, axis=...)`: * `axis == 0` inser
matrix/matrix.c:10419
Function
matrix_inverse_gauss_jordan
* @brief Computes the inverse of a square matrix using the Gauss-Jordan elimination method. * * This function takes a square matrix and computes its
matrix/matrix.c:6396
Function
matrix_inverse_hilbert
* @brief Creates the inverse of a Hilbert matrix of size `n`. * * This function generates the inverse of a Hilbert matrix, which is a square matrix
matrix/matrix.c:9533
Function
matrix_is_columnar
* @brief Checks if a matrix is a column vector. * * A column vector is a matrix with only one column and one or more rows. * * @param matrix The m
matrix/matrix.c:2840
Function
matrix_is_diagonal
* @brief Checks if a matrix is diagonal. * * A matrix is considered diagonal if all its off-diagonal elements are zero. * This function checks whe
matrix/matrix.c:5531
Function
matrix_is_hankel
* @brief Checks if a matrix is a Hankel matrix. * * A Hankel matrix is a matrix in which each ascending anti-diagonal from left to right is constant
matrix/matrix.c:5708
Function
matrix_is_idempotent
* @brief Checks if a matrix is idempotent (i.e., A^2 = A). * * An idempotent matrix is a matrix that, when multiplied by itself, yields the same mat
matrix/matrix.c:2779
Function
matrix_is_lower_triangular
* @brief Checks if a matrix is lower triangular. * * A matrix is lower triangular if all the elements above the main diagonal are zero. * This fun
matrix/matrix.c:5036
Function
matrix_is_orthogonal
* @brief Checks if a matrix is orthogonal. * * A matrix is orthogonal if its transpose is equal to its inverse, or equivalently, if the matrix multi
matrix/matrix.c:5565
← previous
next →
1,601–1,700 of 2,651, ranked by callers