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
↓ 1 callers
Function
matrix_sum_axis
* @brief Sums a matrix along one axis. * * The C analogue of NumPy's `numpy.sum(M, axis=...)`: * - `axis == 0` sums down each column, returning a
matrix/matrix.c:7018
↓ 1 callers
Function
matrix_var
* @brief Computes the variance of all elements of a matrix. * * The C analogue of NumPy's `numpy.var(M)`: the population variance with * `ddof = 0`
matrix/matrix.c:3938
↓ 1 callers
Function
matrix_var_axis
* @brief Variance of a matrix along one axis. * * The C analogue of NumPy's `numpy.var(M, axis=...)` with the default `ddof = 0` * (population vari
matrix/matrix.c:7850
↓ 1 callers
Function
matrix_vstack
* @brief Concatenates two matrices vertically (one above the other). * * The C analogue of NumPy's `numpy.vstack((A, B))` for 2-D arrays: places `B`
matrix/matrix.c:3502
↓ 1 callers
Function
md5_final
uuid/uuid.c:130
↓ 1 callers
Function
md5_init
uuid/uuid.c:98
↓ 1 callers
Function
merge
algorithm/algorithm.c:160
↓ 1 callers
Function
mergeSortInternal
algorithm/algorithm.c:192
↓ 1 callers
Function
mergesort_recursive
MergeSort - O(n log n) stable sort
sort/sort.c:425
↓ 1 callers
Function
min_number
matrix/matrix.c:54
↓ 1 callers
Function
mmap
xml/xml.c:47
↓ 1 callers
Function
munmap
xml/xml.c:61
↓ 1 callers
Function
normalize_vector
function to normalize a vector
matrix/matrix.c:134
↓ 1 callers
Function
parse_boolean
* @brief Parses a JSON boolean value from the input string. * * This function assumes that the current token is either "true" or "false". * It adv
json/json.c:750
↓ 1 callers
Function
parse_null
* @brief Parses a JSON null value from the input string. * * This function assumes that the current token is the literal "null". * It advances the
json/json.c:718
↓ 1 callers
Function
parse_number
* @brief Parses a JSON number from the input string. * * This function assumes that the current token is the start of a JSON number. * It reads ch
json/json.c:656
↓ 1 callers
Function
persian_to_jdn
Helper function to convert Persian date to Julian Day Number. The previous implementation used a closed-form 33-year-cycle formula that disagrees wit
date/date.c:852
↓ 1 callers
Function
plot_create
* @brief Create a new plot configured with default colours and sizes. * * Allocates a zero-initialized Plot via `calloc` and populates it with * sa
plot/plot.c:297
↓ 1 callers
Function
plot_destroy
* @brief Release every resource owned by the plot. * * Iterates each series and frees its xData / yData / label buffers, * then frees the title and
plot/plot.c:358
↓ 1 callers
Function
plot_draw
* @brief Open a window and render the plot until the user closes it. * * Initialises a raylib window sized to the plot's current width/height, * se
plot/plot.c:767
↓ 1 callers
Function
postgres_connect
* @brief Connects to the PostgreSQL database using the initialized connection parameters. * * @param pg Pointer to the Postgres structure represent
database/postgres.c:96
↓ 1 callers
Function
postgres_disconnect
* @brief Disconnects from the PostgreSQL database. * * @param pg Pointer to the Postgres structure representing the connection. */
database/postgres.c:228
↓ 1 callers
Function
postgres_num_fields
* @brief Retrieves the number of fields (columns) in a result set. * * @param pgRes Pointer to the PostgresResult structure containing the result s
database/postgres.c:1235
↓ 1 callers
Function
postgres_num_tuples
* @brief Retrieves the number of tuples (rows) in a result set. * * @param pgRes Pointer to the PostgresResult structure containing the result set.
database/postgres.c:1218
↓ 1 callers
Function
postgres_query_with_time
* @brief Honest version of `postgres_query_execution_time`: * runs @p query, returns the result, AND writes the elapsed * wall-clock s
database/postgres.c:2709
↓ 1 callers
Function
priority_queue_create
* @brief Create an empty priority queue with the given element size * and comparator. * * Allocates a PriorityQueue header and an empty back
priority_queue/priority_queue.c:202
↓ 1 callers
Function
priority_queue_is_greater
* @brief Lexicographic greater-than over the underlying storage bytes. * * Returns false if either operand is NULL. * * @param a Left queue. * @p
priority_queue/priority_queue.c:809
↓ 1 callers
Function
priority_queue_is_less
* @brief Lexicographic less-than over the underlying storage bytes. * * Returns false if either operand is NULL. * * @param a Left queue. * @para
priority_queue/priority_queue.c:786
↓ 1 callers
Function
priority_queue_top
* @brief Borrowed pointer to the highest-priority element (heap root). * * This is the element that @ref priority_queue_pop will remove next. * The
priority_queue/priority_queue.c:461
↓ 1 callers
Function
queue_create
* @brief Create an empty queue whose elements are @p itemSize bytes each. * * Allocates a Queue header and an empty backing Vector. No elements * a
queue/queue.c:84
↓ 1 callers
Function
queue_is_greater
* @brief Lexicographic greater-than over the underlying vector bytes. * * Returns false if either operand is NULL. * * @param q1 Left queue. * @p
queue/queue.c:524
↓ 1 callers
Function
queue_is_less
* @brief Lexicographic less-than over the underlying vector bytes. * * Returns false if either operand is NULL. * * @param q1 Left queue. * @para
queue/queue.c:501
↓ 1 callers
Function
quicksort_recursive
QuickSort - O(n log n) average, O(n²) worst case
sort/sort.c:375
↓ 1 callers
Function
random_uniform
* @brief This function generates a random double precision floating-point number * in the range [a, b). If `a` is greater than `b`, their values
random/random.c:207
↓ 1 callers
Function
rbmap_erase_fixup
* @brief Restores Red-Black Tree properties after a node deletion. * * This function is called after a node has been removed from the Red-Black Tree
map/map.c:390
↓ 1 callers
Function
rbmap_minimum
* @brief Finds the node with the minimum key in the subtree. * * This function traverses the left children of the given node * until it reaches the
map/map.c:363
↓ 1 callers
Function
rbmap_pool_alloc
Carve one node slot from the pool: reuse a freed slot, else the current * slab, else a fresh slab. Returns NULL only if a slab allocation fails. */
map/map.c:140
↓ 1 callers
Function
rbset_clone_subtree
* @brief Deep structural clone of a subtree into `dst`'s pool. * * Used by set_copy: the copy is an exact, already-balanced replica (colours and *
set/set.c:164
↓ 1 callers
Function
rbset_create_node
* @brief Allocates a new RED leaf node holding a deep copy of `element`. * * The node comes from the set's pool and the `elemSize`-byte element is s
set/set.c:138
↓ 1 callers
Function
rbset_elem_align
Largest power of two dividing elemSize, capped at max_align_t. A type's * alignment always divides its size, so this is always >= the real element *
set/set.c:52
↓ 1 callers
Function
rbset_erase_fixup
* @brief Restores red-black invariants after a deletion (CLRS RB-DELETE-FIXUP). * * `x` may be NULL when the deleted leaf had no replacement child;
set/set.c:369
↓ 1 callers
Function
rbset_insert_fixup
* @brief Restores red-black invariants after a BST insertion (CLRS RB-INSERT-FIXUP). * @param set Owning set. * @param newNode The freshly inser
set/set.c:310
↓ 1 callers
Function
rbset_pool_free
Return a node's slot to the free-list for reuse (used on erase). */
set/set.c:106
↓ 1 callers
Function
rbset_print_subtree
@brief Internal: in-order traversal invoking `printElem` on each element. */
set/set.c:1375
↓ 1 callers
Function
regex_append_with_refs
* @brief Internal: append @p replacement to the output buffer, expanding * backreferences against the current match @p m. * * Substitution g
regex/std_regex.c:774
↓ 1 callers
Function
regex_pcre_to_posix
Translate the PCRE escapes this project uses (\d \w \s and their negations) * into POSIX ERE bracket expressions, so patterns authored for the Window
regex/std_regex.c:42
↓ 1 callers
Function
registry_remove
Returns true if p was tracked (and removes it); false if not present. */
string/std_string.c:166
↓ 1 callers
Function
remove_directory_recursive_posix
dir/dir.c:288
↓ 1 callers
Function
remove_directory_recursive_win
dir/dir.c:92
↓ 1 callers
Function
remove_memory_record
* @brief Remove the record for @p address from the tracking list and * decrement `total_memory_allocated` by its recorded size. * * Called b
unittest/unittest.c:227
↓ 1 callers
Function
remove_ssl_mapping
Remove SSL mapping for a socket
network/tcp.c:55
↓ 1 callers
Function
resize_stamps_if_needed
* @brief Resizes the stamp buffer if needed. * * This function checks if the current number of stamps exceeds the allocated capacity. If the capaci
turtle/turtle.c:291
↓ 1 callers
Function
serialize_array
* @brief Serializes a JSON array into a JSON-formatted string. * * This function converts a JSON array into its JSON string representation, * inc
json/json.c:958
↓ 1 callers
Function
serialize_object
* @brief Serializes a JSON object into a JSON-formatted string. * * This function converts a JSON object into its JSON string representation, * i
json/json.c:979
↓ 1 callers
Function
set_copy
* @brief Creates an independent deep copy of a set. * * The copy has the same element size and comparator as `src` and contains * its own copies of
set/set.c:537
↓ 1 callers
Function
set_deallocate
* @brief Frees every element and the set object itself. * * After this call the `set` pointer is invalid and must not be reused. * * @param set Th
set/set.c:570
↓ 1 callers
Function
set_end
* @brief Returns the past-the-end iterator (`node == NULL`). * @param set The set (unused; accepted for symmetry). * @return The end iterator. */
set/set.c:1023
↓ 1 callers
Function
set_is_equal
* @brief Reports whether two sets contain exactly the same elements. * @param set1 First set. @param set2 Second set. * @return true if equal; false
set/set.c:1287
↓ 1 callers
Function
set_is_subset
* @brief Reports whether every element of `a` is also in `b` (`a ⊆ b`). * @param a Candidate subset. @param b Candidate superset. * @return true if
set/set.c:1206
↓ 1 callers
Function
set_lower_bound
* @brief Returns an iterator to the first element not less than `element`. * * Equivalent to `std::set::lower_bound`: the first element `>=` `elemen
set/set.c:849
↓ 1 callers
Function
set_rbegin
* @brief Returns an iterator to the last (largest) element, for reverse walks. * * Walk backwards with set_iterator_decrement until the iterator equ
set/set.c:1037
↓ 1 callers
Function
set_rend
* @brief Returns the before-the-beginning iterator for reverse walks (`node == NULL`). * @param set The set (unused; accepted for symmetry). * @retu
set/set.c:1051
↓ 1 callers
Function
set_upper_bound
* @brief Returns an iterator to the first element greater than `element`. * * Equivalent to `std::set::upper_bound`: the first element `>` `element`
set/set.c:882
↓ 1 callers
Function
sha1_final
uuid/uuid.c:248
↓ 1 callers
Function
sha1_init
uuid/uuid.c:214
↓ 1 callers
Function
shift_right
* Like "b >> offset" but it will do the right thing with negative offset. * We need this as bitwise shifting by a negative offset is undefined * beh
encoding/encoding.c:644
↓ 1 callers
Function
sort_adaptive
* @brief Adaptive sort that picks the best algorithm based on array size. * * - `size ≤ 10` → insertion sort. * - `10 < size ≤ 100` → shell sort.
sort/sort.c:1631
↓ 1 callers
Function
sort_bubblesort
* @brief Bubble sort with early-exit optimization. * * Repeatedly steps through the array, swapping adjacent out-of-order * elements. Early-exits w
sort/sort.c:532
↓ 1 callers
Function
sort_bucket
* @brief Bucket sort optimized for uniformly-distributed floating-point keys. * * Distributes elements into `n` buckets based on a linear projection
sort/sort.c:844
↓ 1 callers
Function
sort_counting
* @brief Counting sort over integer keys. * * Tallies how many times each distinct integer value appears (after shifting * by `min`), then writes t
sort/sort.c:676
↓ 1 callers
Function
sort_generic
* @brief Dispatch to a specific sort algorithm by enum tag. * * Convenience wrapper that picks the named algorithm from `SortAlgorithm` * and optio
sort/sort.c:970
↓ 1 callers
Function
sort_introspective
* @brief Introspective sort — hybrid of quicksort, heapsort, and insertion sort. * * Starts as quicksort; switches to heapsort when the recursion de
sort/sort.c:933
↓ 1 callers
Function
sort_lower_bound
* @brief Return the first index where `target` could be inserted to keep * `array` sorted (analog of `std::lower_bound`). * * Equivalent to
sort/sort.c:1736
↓ 1 callers
Function
sort_merge
* @brief Merge two adjacent sorted sub-ranges into one sorted range. * * Treats `array[left..mid]` and `array[mid+1..right]` as independently * sor
sort/sort.c:1257
↓ 1 callers
Function
sort_mergesort_optimized
* @brief Mergesort with small-array fallback to insertion sort. * * Arrays of ≤10 elements run through insertion sort (faster constant * factors),
sort/sort.c:1483
↓ 1 callers
Function
sort_nth_element
* @brief Quickselect-style nth-element: rearrange `array` so the element that * would be at sorted index `n` ends up at `array[n]`. * * Afte
sort/sort.c:2119
↓ 1 callers
Function
sort_partition_median_of_three
* @brief Median-of-three partition for quicksort. * * Picks the median of `array[left]`, `array[mid]`, `array[right]` as the * pivot, moves it to `
sort/sort.c:1859
↓ 1 callers
Function
sort_radix
* @brief LSD (least-significant-digit) radix sort over base-10 integers. * * Runs a stable counting sort for each decimal digit, from least to most
sort/sort.c:762
↓ 1 callers
Function
sort_selection
* @brief Selection sort. * * Finds the minimum of the unsorted suffix and swaps it into position. * **Not stable.** Performs exactly `n - 1` swaps
sort/sort.c:581
↓ 1 callers
Function
sort_upper_bound
* @brief Return one-past-the-last index where `target` appears in a sorted * array (analog of `std::upper_bound`). * * Equivalent to the sma
sort/sort.c:1772
↓ 1 callers
Function
span_is_equal
* @brief Byte-exact equality between two spans (NULL == NULL). * * Two spans are equal iff: * - they point at the same Span (reflexive), OR *
span/span.c:440
↓ 1 callers
Function
split_query
json/json.c:154
↓ 1 callers
Function
split_string
cli/cli.c:18
↓ 1 callers
Function
srt_heapsort
Heapsort — introsort's O(n log n) worst-case fallback. */
algorithm/algorithm.c:99
↓ 1 callers
Function
srt_introsort
Median-of-3 Hoare quicksort, switching to insertion sort for small ranges and * to heapsort once recursion gets too deep. Recurses on the smaller par
algorithm/algorithm.c:114
↓ 1 callers
Function
srt_isort
algorithm/algorithm.c:62
↓ 1 callers
Function
stack_create
* @brief Create a new stack whose elements are `itemSize` bytes each. * @return Pointer to the new stack, or NULL on bad input / OOM. */
stack/stack.c:25
↓ 1 callers
Function
stack_is_greater
@brief Lexicographic greater-than. */
stack/stack.c:259
↓ 1 callers
Function
stack_is_less
@brief Lexicographic less-than over the underlying vector bytes. */
stack/stack.c:249
↓ 1 callers
Function
statistics_pvariance
* @brief This function calculates the population variance of the given data points. * Optionally, it can use a provided mean (mu) instead of computin
statistics/statistics.c:779
↓ 1 callers
Function
statistics_spearman_correlation
Computes Spearman's rank correlation via Pearson on the ranks. The simple 1 - 6*sum(d^2)/(n*(n^2-1)) shortcut only matches when there are no tied valu
statistics/statistics.c:266
↓ 1 callers
Function
statistics_sum
* @brief Calculates the sum of the elements in the array data with n elements. */
statistics/statistics.c:76
↓ 1 callers
Function
statistics_variance
* @brief This function calculates the sample variance of the given data points. * Optionally, it can use a provided mean (xbar) instead of computing
statistics/statistics.c:716
↓ 1 callers
Function
string_length_utf8
* @brief This function returns the number of UTF-8 characters in the given C-string * `str`. It correctly handles multi-byte UTF-8 characters. * *
string/std_string.c:3802
↓ 1 callers
Function
string_replace
* @brief Replaces the first occurrence of a substring within the String object with another substring. * * This function searches for the first occu
string/std_string.c:1182
↓ 1 callers
Function
string_trim
* @brief This function removes all leading and trailing whitespace characters from the String object. * It combines the operations of string_trim_lef
string/std_string.c:2223
↓ 1 callers
Function
string_trim_left
* @brief This function removes all leading whitespace characters from the String object. * If the String object is NULL or empty, the function return
string/std_string.c:2152
↓ 1 callers
Function
string_trim_right
* @brief This function removes all trailing whitespace characters from the String object. * If the String object is NULL or empty, the function retur
string/std_string.c:2186
↓ 1 callers
Function
string_utf8_char_len
* @brief This function checks the first byte of a UTF-8 encoded character and returns * the number of bytes that the character occupies. UTF-8 chara
string/std_string.c:3863
↓ 1 callers
Function
subtract_projection
matrix/matrix.c:145
← previous
next →
701–800 of 2,651, ranked by callers