Function
- Home /
- Categories /
- Function
BitVecClone
BitVecClone Description Create a deep copy of a bitvector. The returned bitvector must be deinitialized when no longer needed.
Read MoreBitVecFindLast
BitVecFindLast Description Find index of last occurrence of a specific bit value.
Read MoreBitVecInsert
BitVecInsert Description Insert a bit at given index in bitvector. Shifts all bits at and after the index to the right.
Read MoreBitVecInsertMultiple
BitVecInsertMultiple Description Insert all bits from another bitvector at a specific position. All existing bits at and after the position are shifted right.
Read MoreBitVecInsertPattern
BitVecInsertPattern Description Insert a bit pattern from a byte at a specific position. Only the specified number of bits from the pattern are inserted.
Read MoreBitVecInsertRange
BitVecInsertRange Description Insert multiple bits of the same value at a specific position. All existing bits at and after the position are shifted right.
Read MoreBitVecLongestRun
BitVecLongestRun Description Find the longest consecutive sequence of a specific bit value.
Read MoreBitVecPush
BitVecPush Description Push a bit to the end of bitvector. Grows the bitvector if necessary.
Read MoreBitVecShrinkToFit
BitVecShrinkToFit Description Reduce bitvector capacity to match its current length. Frees any unused memory allocated beyond the current length.
Read MoreBitVecSwap
BitVecSwap Description Efficiently swap the contents of two bitvectors. This is much faster than copying both bitvectors.
Read Moredeadend_test_driver
deadend_test_driver Description Run an array of deadend test functions (all expecting failure).
Read Morerun_test_suite
run_test_suite Description Main test driver that handles both normal and deadend tests.
Read Moretest_deadend
test_deadend Description Run a specific test function using setjmp/longjmp to capture aborts. This is used for deadend tests that are expected to call LOG_FATAL.
Read MoreValidateBitVec
ValidateBitVec Description Validate whether a given BitVec object is valid. Not foolproof but will work most of the time. Aborts if provided BitVec is not valid.
Read MoreBitVecAlignmentScore
BitVecAlignmentScore Description Calculate alignment score between two bitvectors. Used in bioinformatics-style sequence alignment with match/mismatch scoring.
Read MoreBitVecBestAlignment
BitVecBestAlignment Description Find best overlapping alignment between two bitvectors. Returns the offset that gives the best alignment score.
Read MoreBitVecClear
BitVecClear Description Clear all bits in bitvector without deallocating memory. Sets length to 0 but keeps allocated capacity.
Read MoreBitVecCompare
BitVecCompare Description Compare two bitvectors lexicographically. Comparison is done bit by bit from left to right.
Read MoreBitVecCompareRange
BitVecCompareRange Description Compare ranges of two bitvectors lexicographically.
Read MoreBitVecContainsAt
BitVecContainsAt Description Check if bitvector contains the given pattern at a specific position.
Read MoreBitVecCorrelation
BitVecCorrelation Description Calculate Pearson correlation coefficient between two bitvectors. Treats bits as 0/1 values and computes linear correlation.
Read MoreBitVecCosineSimilarity
BitVecCosineSimilarity Description Calculate cosine similarity between two bitvectors. Treats bitvectors as binary vectors and computes cosine of angle between them.
Read MoreBitVecCountPattern
BitVecCountPattern Description Count total occurrences of a bit pattern in the bitvector.
Read MoreBitVecDeinit
BitVecDeinit Description Deinitialize bitvector and free all allocated memory. After calling this, the bitvector should not be used unless re-initialized.
Read MoreBitVecDisjoint
BitVecDisjoint Description Check if two bitvectors are disjoint (have no common 1-bits).
Read MoreBitVecDotProduct
BitVecDotProduct Description Calculate dot product of two bitvectors. Dot product is the count of positions where both bits are 1.
Read MoreBitVecEditDistance
BitVecEditDistance Description Calculate edit distance between two bitvectors. Edit distance is minimum number of single-bit operations to transform one into the other.
Read MoreBitVecEndsWith
BitVecEndsWith Description Check if bitvector ends with the given bit pattern.
Read MoreBitVecEntropy
BitVecEntropy Description Calculate information entropy of a bitvector. Entropy measures the randomness/information content of the bit pattern.
Read MoreBitVecEquals
BitVecEquals Description Test equality between two bitvectors. Two bitvectors are equal if they have the same length and all bits match.
Read MoreBitVecEqualsRange
BitVecEqualsRange Description Compare specific ranges of two bitvectors for equality.
Read MoreBitVecFindAllPattern
BitVecFindAllPattern Description Find all occurrences of a bit pattern in the bitvector. Results array must be pre-allocated with sufficient space.
Read MoreBitVecFindLastPattern
BitVecFindLastPattern Description Find last occurrence of a bit pattern in the bitvector.
Read MoreBitVecFindPattern
BitVecFindPattern Description Find first occurrence of a bit pattern in the bitvector.
Read MoreBitVecFlip
BitVecFlip Description Flip the value of bit at given index in bitvector. Changes 0 to 1 and 1 to 0.
Read MoreBitVecFromBytes
BitVecFromBytes Description Create bitvector from byte array. Reads the specified number of bits from the byte array.
Read MoreBitVecFromInteger
BitVecFromInteger Description Create bitvector from integer value. Creates a bitvector representing the specified number of bits from the integer.
Read MoreBitVecFromStr
BitVecFromStr Description Create bitvector from string representation. String should contain only ‘1’ and ‘0’ characters.
Read MoreBitVecFuzzyMatch
BitVecFuzzyMatch Description Fuzzy pattern matching allowing up to N mismatches. Useful for approximate pattern matching with error tolerance.
Read MoreBitVecHammingDistance
BitVecHammingDistance Description Calculate Hamming distance between two bitvectors. Hamming distance is the number of positions where bits differ.
Read MoreBitVecIsSorted
BitVecIsSorted Description Check if bits in bitvector are in sorted order. Useful for certain algorithms and data structures.
Read MoreBitVecIsSubset
BitVecIsSubset Description Check if first bitvector is a subset of the second. A bitvector is a subset if all its 1-bits are also 1-bits in the other.
Read MoreBitVecIsSuperset
BitVecIsSuperset Description Check if first bitvector is a superset of the second. A bitvector is a superset if it contains all 1-bits from the other.
Read MoreBitVecJaccardSimilarity
BitVecJaccardSimilarity Description Calculate Jaccard similarity between two bitvectors. Jaccard similarity = |intersection| / |union|
Read MoreBitVecMatches
BitVecMatches Description Match bitvector against pattern with wildcards. Wildcards allow flexible pattern matching where some positions can be “any bit”.
Read MoreBitVecNumericalCompare
BitVecNumericalCompare Description Compare two bitvectors as unsigned integers. Treats bitvectors as unsigned binary numbers (LSB first).
Read MoreBitVecOverlaps
BitVecOverlaps Description Check if two bitvectors overlap (have any common 1-bits).
Read MoreBitVecPrefixMatch
BitVecPrefixMatch Description Match bitvector against an array of prefix patterns. Returns the index of the first matching prefix.
Read MoreBitVecRegexMatch
BitVecRegexMatch Description Simple regex-style pattern matching for bitvectors. Supports basic patterns: ‘*’ (any sequence), ‘?’ (0 or 1), ‘[01]’ (literal).
Read MoreBitVecRemove
BitVecRemove Description Remove a bit at given index from bitvector. Shifts all bits after the index to the left.
Read MoreBitVecRemoveAll
BitVecRemoveAll Description Remove all occurrences of a specific bit value. Returns the number of bits that were removed.
Read MoreBitVecRemoveFirst
BitVecRemoveFirst Description Remove the first occurrence of a specific bit value. Returns true if a bit was found and removed, false otherwise.
Read MoreBitVecRemoveLast
BitVecRemoveLast Description Remove the last occurrence of a specific bit value. Returns true if a bit was found and removed, false otherwise.
Read MoreBitVecRemoveRange
BitVecRemoveRange Description Remove multiple consecutive bits starting at a specific position. All bits after the removed range are shifted left.
Read MoreBitVecReplace
BitVecReplace Description Replace first occurrence of old pattern with new pattern.
Read MoreBitVecReplaceAll
BitVecReplaceAll Description Replace all occurrences of old pattern with new pattern.
Read MoreBitVecReserve
BitVecReserve Description Reserve space for at least n bits in bitvector. Does not change the length, only ensures capacity.
Read MoreBitVecResize
BitVecResize Description Reu64 bitvector to hold exactly n bits. May grow or shrink the bitvector.
Read MoreBitVecReverse
BitVecReverse Description Reverse the order of all bits in bitvector. First bit becomes last, last becomes first, etc.
Read MoreBitVecRFindPattern
BitVecRFindPattern Description Search for a pattern starting from a specific position (reverse search).
Read MoreBitVecRotateLeft
BitVecRotateLeft Description Rotate all bits in bitvector to the left by specified positions. Bits that fall off the left end wrap around to the right.
Read MoreBitVecRotateRight
BitVecRotateRight Description Rotate all bits in bitvector to the right by specified positions. Bits that fall off the right end wrap around to the left.
Read MoreBitVecRunLengths
BitVecRunLengths Description Analyze run lengths in a bitvector. A run is a sequence of consecutive identical bits. Results array must be pre-allocated with sufficient space.
Read MoreBitVecShiftLeft
BitVecShiftLeft Description Shift all bits in bitvector to the left by specified positions. New bits on the right are filled with zeros.
Read MoreBitVecShiftRight
BitVecShiftRight Description Shift all bits in bitvector to the right by specified positions. New bits on the left are filled with zeros.
Read MoreBitVecSignedCompare
BitVecSignedCompare Description Compare two bitvectors as signed integers (MSB is sign bit).
Read MoreBitVecStartsWith
BitVecStartsWith Description Check if bitvector starts with the given bit pattern.
Read MoreBitVecSuffixMatch
BitVecSuffixMatch Description Match bitvector against an array of suffix patterns. Returns the index of the first matching suffix.
Read MoreBitVecToBytes
BitVecToBytes Description Export bitvector to byte array. Copies the internal bit representation to the provided byte array.
Read MoreBitVecToInteger
BitVecToInteger Description Convert bitvector to integer (up to 64 bits). Treats the bitvector as an unsigned integer with LSB first.
Read MoreBitVecToStr
BitVecToStr Description Convert bitvector to string representation. Each bit becomes ‘1’ or ‘0’ character. Caller must free the returned string.
Read MoreBitVecWeightCompare
BitVecWeightCompare Description Compare two bitvectors by their Hamming weights (number of 1s).
Read MoreFReadFmtInternal
FReadFmtInternal Description Read formatted data from file streams (stdin, or other file)
Read MoreReadCompleteFile
ReadCompleteFile Description Read complete contents of file at once. Pointer returned is malloc’d and hence must be freed after use. The returned pointer can also be reused by providing pointer to it in data parameter. realloc is called on *data in order to expand it’s size. If *capacity exceeds the size of file to be loaded, then no reallocation is performed. This means the provided buffer will automatically be expanded if required. The returned buffer is null-terminated just-in-case. The implementation and API is designed in such a way that it can be used with containers like Vec and Str.
Read MoreStrEndsWithCstr
StrEndsWithCstr Description Check if string ends with a fixed-length C-style string (Cstr).
Read MoreStrEndsWithZstr
StrEndsWithZstr Description Check if string ends with a null-terminated string (Zstr).
Read MoreStrReplaceCstr
StrReplaceCstr Description Replace occurrences of a fixed-length string (Cstr) in string.
Read MoreStrReplaceZstr
StrReplaceZstr Description Replace occurrences of a null-terminated string (Zstr) in string.
Read MoreStrSplit
StrSplit Description Split the given Str object into multiple Str objects stored in a vector of Str objects. Each Str object in returned vector is a new Str object and hence must be deinited after use. Calling VecDeinit() on the returned vector will do that for you automatically for all the objects. This is best used when iterating over a delimited data is not the only goal, but also other modifications like stripping over whitespaces from returned Str objects.
Read MoreStrSplitToIters
StrSplitToIters Description Split given string into multiple StrIter into the same string. This way the split operation can be performed without creating new strings, but instead just having an iterated view into the Str object. This is best used when user never needs to make modifications and save the modifications. In other words, best used when only need iteration over string with some delimiters.
Read MoreStrStartsWithCstr
StrStartsWithCstr Description Check if string starts with a fixed-length C-style string (Cstr).
Read MoreStrStartsWithZstr
StrStartsWithZstr Description Check if string starts with a null-terminated string (Zstr).
Read MoreStrWriteFmtInternal
StrWriteFmtInternal Description Print out a formatted string with rust-style placeholders to given string o.
Read MoreSysDestroyProcess
SysDestroyProcess Description Clean up process information and free resources. Process must be completed or terminated before calling this.
Read MoreSysGetCurrentProcessId
SysGetCurrentProcessId Description Platform independent method to get current process Id.
Read MoreSysGetDirContents
SysGetDirContents Description Read directory contents into a vector. Current contents of the vector will be cleared out.
Read MoreSysGetProcessExitCode
SysGetProcessExitCode Description Get the exit code of a completed process.
Read MoreSysMutexDestroy
SysMutexDestroy Description Destroy the provided mutex object. Once a mutex is destroyed, all resources held by it will be freed. Using it after this cal is UB.
Read MoreSysSetAbortCallback
SysSetAbortCallback Description Set a custom callback function for SysAbort. If no callback is set, SysAbort will call the standard abort() function.
Read MoreSysWaitForProcess
SysWaitForProcess Description Wait for a process to complete with optional timeout.
Read MoreValidateStr
ValidateStr Description Validate whether a given Str object is valid. Not foolproof but will work most of the time. Aborts if provided Str is not valid.
Read MoreValidateStrs
ValidateStrs Description Validate whether a given Strs object is valid. Not foolproof but will work most of the time. Aborts if provided Strs is not valid.
Read MoreZstrCompareN
ZstrCompareN Description Compare two strings lexicographically up to n characters.
Read More