ORIGINAL
Loading...
Searching...
No Matches
Classes | Concepts | Typedefs | Functions | Variables
original Namespace Reference

Main namespace for the project Original. More...

Classes

class  absTransform
 Transformation that converts an element to its absolute value. More...
 
class  addOptTransform
 Transformation that adds a given value to an element. More...
 
class  algorithms
 Utility class containing generic container algorithms. More...
 
class  allocateError
 Exception for memory allocation failures. More...
 
class  allocator
 Default memory allocator using allocators utilities. More...
 
class  allocatorBase
 Interface for other memory allocator implementations. More...
 
class  allocators
 Utility class providing static memory allocation/de-allocation functions. More...
 
class  alternative
 A type-safe container that may or may not contain a value. More...
 
class  alternative< void >
 
class  array
 A fixed-size array container with random access. More...
 
class  assignOptTransform
 Transformation that assigns a specified value to an element. More...
 
class  async
 Asynchronous programming utilities with future/promise pattern. More...
 
class  autoPtr
 Base smart pointer with reference counting. More...
 
class  baseArray
 Base class for fixed-size serial containers. More...
 
class  baseCloneable
 Base class that defines a cloneable interface. More...
 
class  baseIterator
 A base class for basic iterators. More...
 
class  baseList
 Base class for variable-size serial containers. More...
 
class  bitSet
 A class representing a set of bits, offering functionality to manipulate and query individual bits. More...
 
class  blocksList
 A block-based list implementation. More...
 
class  callBackChecker
 Static utility for validating callback signatures. More...
 
class  callbackReturnTypeError
 Exception for callback return type mismatch. More...
 
class  callbackSignatureError
 Exception for callback argument mismatch. More...
 
class  chain
 Non-cyclic doubly linked list container. More...
 
class  cloneable
 Concrete cloneable class with custom cloning behavior. More...
 
class  comparable
 Base class for comparable objects. More...
 
class  comparator
 Base class for comparison. More...
 
class  conditionBase
 Abstract base class for condition variable implementations. More...
 
class  container
 Abstract base class for containers. More...
 
class  containerAdapter
 Adapter class that provides unified interface for various container types. More...
 
class  copyTransform
 Transformation that copies an element into a container. More...
 
class  coroutine
 Namespace for coroutine-related utilities and generator implementation. More...
 
class  couple
 Container for two heterogeneous elements. More...
 
class  decreaseComparator
 Comparator for decreasing comparison (greater than). More...
 
class  decreaseNotStrictComparator
 Comparator for non-strict decreasing comparison (greater than or equal to). More...
 
class  deleter
 Default deletion policy for single objects. More...
 
class  deleter< TYPE[]>
 
class  deleterBase
 Base class for deleters defining the deletion policy interface. More...
 
class  deleterBase< TYPE[], DERIVED >
 
class  deque
 Double-ended queue container adapter. More...
 
class  doubleDirectionIterator
 Abstract base class for double-direction iterators. More...
 
class  equalComparator
 Comparator for equality comparison. More...
 
class  equalFilter
 A filter that checks if an element is equal to a target value. More...
 
class  error
 Base class for all exceptions in the Original project. More...
 
class  filter
 Base class for filter operations. More...
 
class  filterStream
 Composite filter builder with logical operator chaining. More...
 
class  forwardChain
 A singly linked list implementation. More...
 
struct  functionTraits
 Primary template for general callable types. More...
 
struct  functionTraits< R(*)(Args...)>
 Specialization for function pointers. More...
 
struct  functionTraits< R(Args...)>
 Specialization for function types. More...
 
struct  functionTraits< R(C::*)(Args...) const >
 Specialization for const member function pointers. More...
 
struct  functionTraits< R(C::*)(Args...)>
 Specialization for non-const member function pointers. More...
 
class  genPipe
 Pipe adapter for generator operations to enable fluent chaining. More...
 
class  greaterFilter
 A filter that checks if an element is greater than a target value. More...
 
class  hash
 Generic hash function object supporting multiple types. More...
 
class  hashable
 Forward declaration of hashable interface template. More...
 
class  hashMap
 Hash table based implementation of the map interface. More...
 
class  hashSet
 Hash table based implementation of the set interface. More...
 
class  hashTable
 Hash table implementation with separate chaining. More...
 
class  increaseComparator
 Comparator for increasing comparison (less than). More...
 
class  increaseNotStrictComparator
 Comparator for non-strict increasing comparison (less than or equal to). More...
 
class  indexSequence
 Compile-time sequence of unsigned integers. More...
 
class  iterable
 A base class for iterable containers that support multiple iteration patterns. More...
 
class  iterationStream
 A stream class that allows iteration, comparison, hashing and printing. More...
 
class  iterator
 Base iterator interface that supports common operations for iteration. More...
 
class  JMap
 Skip List based implementation of the map interface. More...
 
class  JSet
 Skip List based implementation of the set interface. More...
 
class  lessFilter
 A filter that checks if an element is less than a target value. More...
 
class  lockGuard
 Abstract base class for lock guard implementations. More...
 
class  makeIndexSequence
 Utility for generating index sequences. More...
 
class  map
 Abstract base class for key-value mapping containers. More...
 
class  multiLock
 RAII wrapper for multiple mutex locking. More...
 
class  multiOptTransform
 Transformation that multiplies an element by a given value. More...
 
class  mutexBase
 Abstract base class for mutex implementations. More...
 
class  noElementError
 Exception for missing element requests. More...
 
class  none
 A placeholder type representing the absence of a value. More...
 
class  notEqualComparator
 Comparator for inequality comparison. More...
 
class  notEqualFilter
 A filter that checks if an element is not equal to a target value. More...
 
class  notGreaterFilter
 A filter that checks if an element is less than or equal to a target value. More...
 
class  notLessFilter
 A filter that checks if an element is greater than or equal to a target value. More...
 
class  nullPointerError
 Exception for null pointer dereference attempts. More...
 
class  objPoolAllocator
 Object pool allocator for efficient fixed-size memory management. More...
 
class  outOfBoundError
 Exception for container index out-of-range errors. More...
 
class  ownerPtr
 Unique ownership smart pointer with move semantics. More...
 
class  pCondition
 POSIX condition variable implementation. More...
 
class  pMutex
 POSIX thread mutex implementation. More...
 
class  printable
 Base class providing polymorphic string conversion capabilities. More...
 
class  prique
 Heap-based priority queue container. More...
 
class  pThread
 POSIX thread implementation. More...
 
class  queue
 First-In-First-Out (FIFO) container adapter. More...
 
class  randomAccessIterator
 Abstract base class for random-access iterators. More...
 
class  rangeFilter
 A filter that checks if an element lies within a specified range. More...
 
class  RBTree
 Red-Black Tree container implementation. More...
 
class  refCntPtr
 Base class for reference-counted pointers. More...
 
class  refCount
 Reference counting metadata container. More...
 
class  refCountBase
 Base class for reference counting metadata. More...
 
class  semaphore
 Counting semaphore with maximum count constraint. More...
 
class  semaphore< 0 >
 
class  semaphoreGuard
 RAII wrapper for automatic semaphore management. More...
 
class  serial
 Abstract base class for sequential containers with index-based access. More...
 
class  set
 Abstract base class for unique element containers. More...
 
class  singleDirectionIterator
 Abstract base class for single-direction iterators. More...
 
class  singleton
 Thread-safe singleton pattern implementation with ownership management. More...
 
class  skipList
 Skip List container implementation. More...
 
class  stack
 Last-In-First-Out (LIFO) container adapter. More...
 
class  staticError
 Compile-time error triggering utility. More...
 
class  staticError< original::allocateError, TRIGGERING_CONDITION >
 
class  staticError< original::callbackReturnTypeError, TRIGGERING_CONDITION >
 
class  staticError< original::callbackSignatureError, TRIGGERING_CONDITION >
 
class  staticError< original::error, TRIGGERING_CONDITION >
 
class  staticError< original::noElementError, TRIGGERING_CONDITION >
 
class  staticError< original::nullPointerError, TRIGGERING_CONDITION >
 
class  staticError< original::outOfBoundError, TRIGGERING_CONDITION >
 
class  staticError< original::sysError, TRIGGERING_CONDITION >
 
class  staticError< original::unSupportedMethodError, TRIGGERING_CONDITION >
 
class  staticError< original::valueError, TRIGGERING_CONDITION >
 
class  stepIterator
 Abstract base class for step iterators. More...
 
class  strongPtr
 Shared ownership smart pointer with strong references. More...
 
class  syncPoint
 Synchronization point for multiple threads. More...
 
class  sysError
 Exception for generic system failure. More...
 
class  taskDelegator
 Thread pool for managing and executing prioritized tasks. More...
 
class  thread
 High-level thread wrapper. More...
 
class  threadBase
 Base class for thread implementations. More...
 
class  time
 Namespace-like class containing time-related utilities. More...
 
class  transform
 Base class for transformation operations. More...
 
class  transformStream
 Ordered sequence of transformation operations. More...
 
class  treeMap
 Red-Black Tree based implementation of the map interface. More...
 
class  treeSet
 Red-Black Tree based implementation of the set interface. More...
 
class  tuple
 Container for multiple heterogeneous elements. More...
 
class  uniqueLock
 RAII wrapper for single mutex locking. More...
 
class  unSupportedMethodError
 Exception for unimplemented method calls. More...
 
class  valueError
 Exception for invalid parameter values. More...
 
class  vector
 Dynamic array container with amortized constant time operations. More...
 
class  weakPtr
 Non-owning reference to shared resource. More...
 
class  wrapper
 Base class for linked value containers with formatted output. More...
 

Concepts

concept  NotNull
 Ensures the parameter pack is not empty.
 
concept  EnumType
 Requires type to be an enumeration.
 
concept  EnumClassType
 Requires type to be a scoped enumeration.
 
concept  EqualityComparable
 Requires type to support equality comparison operators.
 
concept  WeaklyOrdered
 Requires type to support relational comparison operators.
 
concept  PartiallyComparable
 Requires type to support either equality or relational comparisons.
 
concept  TotallyComparable
 Requires type to support all comparison operators.
 
concept  ThreeWayComparable
 Requires type to support three-way comparison (spaceship operator).
 
concept  StronglyOrdered
 Requires type to support strong ordering via three-way comparison.
 
concept  Comparable
 
concept  CmpTraits
 Requires type to implement the comparable interface with compareTo method.
 
concept  Printable
 Requires type to support output stream insertion.
 
concept  InputStreamable
 Requires type to support input stream extraction.
 
concept  Streamable
 Requires type to support both input and output stream operations.
 
concept  Hashable
 Concept checking for types that can be hashed.
 
concept  Equatable
 Requires type to support equality comparison for hashing.
 
concept  HashTraits
 Requires type to implement the hashable interface with toHash method.
 
concept  Callable
 Basic concept for any callable type.
 
concept  CallbackOf
 Validates callback signature compatibility.
 
concept  Predicate
 Constraint for boolean predicate callbacks.
 
concept  Compare
 Combines Comparable and CallbackOf for comparison callbacks.
 
concept  Condition
 Constraint for predicate callbacks.
 
concept  Operation
 Constraint for mutating operations.
 
concept  Transformer
 Constraint for transformation operations.
 
concept  SuperOf
 Checks inheritance or type equality.
 
concept  ExtendsOf
 Checks derivation or type identity using std::derived_from.
 
concept  ConvertibleTo
 Checks if type is convertible to another type.
 
concept  SameAs
 Checks if two types are exactly the same.
 
concept  Container
 Basic container concept.
 
concept  SequenceContainer
 Sequence container concept.
 

Typedefs

using byte = std::uint8_t
 Unsigned 8-bit integer type (byte)
 
using s_byte = std::int8_t
 Signed 8-bit integer type.
 
using integer = std::int64_t
 64-bit signed integer type for arithmetic operations
 
using u_integer = std::uint32_t
 32-bit unsigned integer type for sizes and indexes
 
using ul_integer = std::uint64_t
 64-bit unsigned integer type
 
using floating = double
 Double-precision floating-point type.
 
using l_floating = long double
 Extended precision floating-point type.
 
template<u_integer N>
using makeReverseSequence = decltype(reverseIndexSequenceImpl(makeSequence< N >()))
 Creates a reversed index sequence.
 

Functions

template<typename T , typename DER , typename DEL >
bool operator== (const autoPtr< T, DER, DEL > &ptr, const std::nullptr_t &null)
 Equality comparison with nullptr.
 
template<typename T , typename DER , typename DEL >
bool operator!= (const autoPtr< T, DER, DEL > &ptr, const std::nullptr_t &null)
 Inequality comparison with nullptr.
 
template<typename T , typename DER , typename DEL >
bool operator== (const std::nullptr_t &null, const autoPtr< T, DER, DEL > &ptr)
 Equality comparison with nullptr (reversed operands)
 
template<typename T , typename DER , typename DEL >
bool operator!= (const std::nullptr_t &null, const autoPtr< T, DER, DEL > &ptr)
 Inequality comparison with nullptr (reversed operands)
 
template<typename ALLOC_ >
bitSet< ALLOC_operator& (const bitSet< ALLOC_ > &lbs, const bitSet< ALLOC_ > &rbs)
 Bitwise AND operator for two bitSets.
 
template<typename ALLOC_ >
bitSet< ALLOC_operator| (const bitSet< ALLOC_ > &lbs, const bitSet< ALLOC_ > &rbs)
 Bitwise OR operator for two bitSets.
 
template<typename ALLOC_ >
bitSet< ALLOC_operator^ (const bitSet< ALLOC_ > &lbs, const bitSet< ALLOC_ > &rbs)
 Bitwise XOR operator for two bitSets.
 
template<typename ALLOC_ >
bitSet< ALLOC_operator~ (const bitSet< ALLOC_ > &bs)
 Bitwise NOT operator for a bitSet.
 
consteval bool ON_WINDOWS ()
 Checks if compiling for Windows platform.
 
consteval bool ON_WIN32 ()
 Checks if compiling for 32-bit Windows.
 
consteval bool ON_WIN64 ()
 Checks if compiling for 64-bit Windows.
 
consteval bool ON_LINUX ()
 Checks if compiling for Linux platform.
 
consteval bool ON_MACOS ()
 Checks if compiling for macOS platform.
 
consteval bool ON_UNIX ()
 Checks if compiling for Unix-like platform (excluding Linux/macOS)
 
consteval bool ON_UNKNOWN_PLATFORM ()
 Checks if compiling for unknown platform.
 
consteval bool USING_CLANG ()
 Checks if compiling with Clang.
 
consteval bool USING_GCC ()
 Checks if compiling with GCC.
 
consteval bool USING_MSVC ()
 Checks if compiling with MSVC.
 
consteval bool USING_UNKNOWN_COMPLIER ()
 Checks if compiling with unknown compiler.
 
template<typename T >
filterStream< T > operator&& (const filter< T > &f1, const filter< T > &f2)
 Create AND filterStream from two filters.
 
template<typename T >
filterStream< T > operator&& (const filter< T > &f, const filterStream< T > &ofs)
 AND operator between filter and filterStream.
 
template<typename T >
filterStream< T > operator&& (const filterStream< T > &ofs, const filter< T > &f)
 AND operator between filterStream and filter.
 
template<typename T >
filterStream< T > operator|| (const filter< T > &f1, const filter< T > &f2)
 Create OR filterStream from two filters.
 
template<typename T >
filterStream< T > operator|| (const filter< T > &f, const filterStream< T > &ofs)
 OR operator between filter and filterStream.
 
template<typename T >
filterStream< T > operator|| (const filterStream< T > &ofs, const filter< T > &f)
 OR operator between filterStream and filter.
 
template<typename T >
filterStream< T > operator! (const filter< T > &f)
 Create negated filterStream from filter.
 
template<typename T >
filterStream< T > operator! (const filterStream< T > &ofs)
 Create negated filterStream from existing stream.
 
template<typename T >
filterStream< T > group (const filterStream< T > &ofs)
 Create grouped filterStream from existing stream.
 
template<typename T >
filterStream< T > group (const filter< T > &f)
 Create grouped filterStream from single filter.
 
template<typename T >
auto operator+ (const iterator< T > &it, integer steps) -> iterator< T > *
 Adds a number of steps to the iterator's current position and returns a new iterator.
 
template<typename T >
auto operator- (const iterator< T > &it, integer steps) -> iterator< T > *
 Subtracts a number of steps from the iterator's current position and returns a new iterator.
 
template<typename T >
bool operator== (const iterator< T > &l_it, const iterator< T > &r_it)
 Equality comparison operator for iterators.
 
template<typename T >
bool operator!= (const iterator< T > &l_it, const iterator< T > &r_it)
 Inequality comparison operator for iterators.
 
template<typename TYPE >
TYPE abs (TYPE a)
 Returns the absolute value of a given number.
 
template<typename TYPE >
TYPE max (TYPE a, TYPE b)
 Returns the larger of two given values.
 
template<typename TYPE >
TYPE min (TYPE a, TYPE b)
 Returns the smaller of two given values.
 
floating pow (floating base, integer exp)
 Returns the result of raising a base to an exponent.
 
template<std::integral INTEGER = int>
coroutine::generator< INTEGERrangesOf (INTEGER start, INTEGER end, INTEGER steps=1)
 Generates a sequence of integers from start to end (exclusive) with a given steps.
 
template<typename T , typename DEL = deleter<T>, typename... Args>
ownerPtr< T, DELmakeOwnerPtr (Args &&... args)
 Creates a new ownerPtr managing a dynamically allocated object.
 
template<typename T , typename DEL = deleter<T[]>, typename... Args>
ownerPtr< T, DELmakeOwnerPtrArray (u_integer size, Args &&... args)
 Creates a new ownerPtr managing a dynamically allocated array.
 
std::ostream & operator<< (std::ostream &os, const printable &p)
 Stream insertion operator for printable objects.
 
template<typename T , typename DEL = deleter<T>, typename... Args>
strongPtr< T, DELmakeStrongPtr (Args &&... args)
 Creates a new strongPtr managing a shared object.
 
template<typename T , typename DEL = deleter<T[]>, typename... Args>
strongPtr< T, DELmakeStrongPtrArray (u_integer size, Args &&... args)
 Creates a new strongPtr managing a shared array.
 
template<typename T >
transformStream< T > operator+ (const transform< T > &t1, const transform< T > &t2)
 Creates new transformation stream from two transforms.
 
template<typename T >
transformStream< T > operator+ (const transform< T > &t, const transformStream< T > &ots)
 Creates new stream by prefixing existing stream.
 
template<typename F_TYPE , typename S_TYPE >
tuple< F_TYPE, S_TYPEmakeTuple (const couple< F_TYPE, S_TYPE > &cp)
 Creates a tuple from a couple (copy version)
 
template<typename F_TYPE , typename S_TYPE >
tuple< F_TYPE, S_TYPEmakeTuple (couple< F_TYPE, S_TYPE > &&cp)
 Creates a tuple from a couple (move version)
 
template<u_integer NUM>
consteval auto makeSequence () noexcept
 Creates an index sequence of given length.
 
template<u_integer... Indices>
consteval auto reverseIndexSequenceImpl (indexSequence< Indices... > seq)
 Implementation detail for reversing an index sequence.
 
template<typename T , typename... ARGS>
vector< T > makeVector (u_integer size, ARGS &&... args)
 
template<typename T , typename Callback >
auto operator| (async::future< T > f, Callback &&c)
 Pipe operator for chaining asynchronous computations.
 
template<typename Callback >
auto operator| (async::future< void > f, Callback &&c)
 Pipe operator specialization for future<void>
 
template<typename T , typename Callback >
auto operator| (async::sharedFuture< T > sf, Callback &&c)
 Pipe operator for chaining computations on sharedFuture.
 
template<typename Callback >
auto operator| (async::sharedFuture< void > sf, Callback &&c)
 Pipe operator specialization for sharedFuture<void>
 
template<typename T , typename Callback1 , typename Callback2 >
auto operator| (async::promise< T, Callback1 > p, Callback2 &&c)
 Lazy pipe operator for chaining promise computations.
 
template<typename Callback1 , typename Callback2 >
auto operator| (async::promise< void, Callback1 > p, Callback2 &&c)
 Lazy pipe operator specialization for promise<void>
 
template<typename TYPE >
coroutine::generator< couple< u_integer, TYPE > > enumerate (coroutine::generator< TYPE > gen)
 Enumerates elements of a generator with their indices.
 
template<typename TYPE , typename SET = hashSet<TYPE>>
requires ExtendsOf<set<TYPE, allocator<couple<const TYPE, const bool>>>, SET>
SET collect (coroutine::generator< TYPE > gen)
 Collects generator elements into a set.
 
template<typename TYPE , template< typename > typename SERIAL = vector>
requires ExtendsOf<baseList<TYPE, allocator<TYPE>>, SERIAL<TYPE>>
SERIAL< TYPElist (coroutine::generator< TYPE > gen)
 Collects generator elements into a list container.
 
template<typename TYPE , typename Callback >
auto transforms (coroutine::generator< TYPE > gen, Callback &&c) -> coroutine::generator< std::invoke_result_t< Callback, TYPE > >
 Transforms generator elements using a callable.
 
template<typename TYPE , typename Callback >
coroutine::generator< TYPEfilters (coroutine::generator< TYPE > gen, Callback &&c)
 Filters generator elements based on a predicate.
 
template<typename TYPE , typename Callback >
coroutine::generator< TYPEextract (coroutine::generator< TYPE > gen, Callback &&c)
 Extracts elements that do not satisfy a predicate.
 
template<typename T , typename U >
coroutine::generator< couple< T, U > > zip (coroutine::generator< T > gen1, coroutine::generator< U > gen2)
 Zips two generators into pairs.
 
template<typename TYPE >
u_integer count (coroutine::generator< TYPE > gen)
 Counts total elements in a generator.
 
template<typename TYPE , typename Callback >
u_integer count (coroutine::generator< TYPE > gen, Callback &&c)
 Counts elements satisfying a predicate.
 
template<typename TYPE , typename Callback >
bool all (coroutine::generator< TYPE > gen, Callback &&c)
 Checks if all elements satisfy a predicate.
 
template<typename TYPE , typename Callback >
bool none (coroutine::generator< TYPE > gen, Callback &&c)
 Checks if no elements satisfy a predicate.
 
template<typename TYPE , typename Callback >
bool any (coroutine::generator< TYPE > gen, Callback &&c)
 Checks if any element satisfies a predicate.
 
template<typename T , std::convertible_to< T > U>
coroutine::generator< T > join (coroutine::generator< T > gen1, coroutine::generator< U > gen2)
 Joins two generators of compatible types.
 
template<typename T , std::convertible_to< T > U>
coroutine::generator< T > flatten (coroutine::generator< couple< T, U > > gen)
 Flattens a generator of couples into a single generator.
 
template<typename TYPE >
coroutine::generator< TYPEtake (coroutine::generator< TYPE > gen, u_integer n)
 Takes the first n elements from a generator.
 
template<typename TYPE >
coroutine::generator< TYPEskip (coroutine::generator< TYPE > gen, u_integer n)
 Skips the first n elements of a generator.
 
template<typename TYPE , typename Callback >
u_integer position (coroutine::generator< TYPE > gen, Callback &&c)
 Finds the position of the first element satisfying a predicate.
 
template<typename TYPE , typename Callback >
TYPE find (coroutine::generator< TYPE > gen, Callback &&c)
 Finds the first element satisfying a predicate.
 
template<typename TYPE , typename F >
auto operator| (coroutine::generator< TYPE > gen, genPipe< F > p)
 Pipe operator for generator operations.
 
template<typename F >
auto transforms (F &&f)
 Creates a transform pipe operation.
 
template<typename F >
auto filters (F &&f)
 Creates a filter pipe operation.
 
template<typename F >
auto extract (F &&f)
 Creates an extract pipe operation.
 
template<typename = void>
auto enumerate ()
 Creates an enumerate pipe operation.
 
template<typename = void>
auto take (u_integer n)
 Creates a take pipe operation.
 
template<typename = void>
auto skip (u_integer n)
 Creates a skip pipe operation.
 
template<typename T , typename U >
auto join (coroutine::generator< U > gen2)
 Creates a join pipe operation.
 
template<typename T , typename U >
auto flatten ()
 Creates a flatten pipe operation.
 
template<typename U >
auto zipWith (coroutine::generator< U > gen2)
 Creates a zipWith pipe operation.
 
template<typename = void>
auto count ()
 Creates a count pipe operation.
 
template<typename F >
auto count (F &&f)
 Creates a conditional count pipe operation.
 
template<typename F >
auto all (F &&f)
 Creates an all-match pipe operation.
 
template<typename F >
auto none (F &&f)
 Creates a none-match pipe operation.
 
template<typename F >
auto any (F &&f)
 Creates an any-match pipe operation.
 
template<typename F >
auto position (F &&f)
 Creates a position-finding pipe operation.
 
template<typename F >
auto find (F &&f)
 Creates an element-finding pipe operation.
 
time::duration nanoseconds (time::time_val_type val=1)
 
time::duration microseconds (time::time_val_type val=1)
 
time::duration milliseconds (time::time_val_type val=1)
 
time::duration seconds (time::time_val_type val=1)
 
time::duration minutes (time::time_val_type val=1)
 
time::duration hours (time::time_val_type val=1)
 
time::duration days (time::time_val_type val=1)
 
time::duration operator- (const time::duration &d)
 
time::duration operator+ (const time::duration &lhs, const time::duration &rhs)
 
time::duration operator- (const time::duration &lhs, const time::duration &rhs)
 
time::duration operator* (const time::duration &d, time::time_val_type factor)
 
time::duration operator* (time::time_val_type factor, const time::duration &d)
 
time::duration operator/ (const time::duration &d, time::time_val_type factor)
 
time::duration operator/ (const time::duration &lhs, const time::duration &rhs)
 
time::duration abs (const time::duration &d)
 
time::point operator+ (const time::point &p, const time::duration &d)
 
time::point operator+ (const time::duration &d, const time::point &p)
 
time::point operator- (const time::point &p, const time::duration &d)
 
time::duration operator- (const time::point &lhs, const time::point &rhs)
 
time::UTCTime operator+ (const time::UTCTime &t, const time::duration &d)
 
time::UTCTime operator+ (const time::duration &d, const time::UTCTime &t)
 
time::UTCTime operator- (const time::UTCTime &t, const time::duration &d)
 
time::duration operator- (const time::UTCTime &lhs, const time::UTCTime &rhs)
 

Variables

constexpr l_floating E = 2.7182818284590452353602874713526624977572470937000
 The mathematical constant E (Euler's number).
 
constexpr l_floating PI = 3.1415926535897932384626433832795028841971693993751
 The mathematical constant PI (π).
 

Detailed Description

Main namespace for the project Original.

The main namespace containing all core type system components.

Main namespace containing all hashing utilities.

This namespace serves as the main container for all modules and functionality within the Original project. It includes various classes, functions, and data structures that form the backbone of the system.

Typedef Documentation

◆ makeReverseSequence

Creates a reversed index sequence.

Template Parameters
NLength of the sequence to create
Returns
indexSequence instance with values N-1..0

Function Documentation

◆ abs() [1/2]

original::time::duration original::abs ( const time::duration d)
inline
Parameters
dDuration to get absolute value of
Returns
Absolute duration

◆ abs() [2/2]

template<typename TYPE >
TYPE original::abs ( TYPE  a)

Returns the absolute value of a given number.

Template Parameters
TYPEThe type of the input value.
Parameters
aThe input value.
Returns
The absolute value of the input value.

This function returns the absolute value of the input argument a, which is the distance of a from zero. It works for both positive and negative values. For unsigned types, returns the value unchanged.

// Example usage:
int a = -5;
int result = original::abs(a); // result will be 5
double b = -3.14;
double result2 = original::abs(b); // result will be 3.14
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
TYPE abs(TYPE a)
Returns the absolute value of a given number.

◆ all() [1/2]

bool original::all ( coroutine::generator< TYPE gen,
Callback &&  c 
)

Checks if all elements satisfy a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe generator to check.
cThe validation predicate.
Returns
true if all elements satisfy the predicate, false otherwise.

Short-circuits on first false result. Returns true for empty generators.

Example:

auto vec = vector{2, 4, 6, 8};
auto gen = vec.generator();
bool all_even = all(gen, [](int x) { return x % 2 == 0; }); // Returns true
coroutine::generator< T > generator() const
Creates a coroutine generator that yields elements from this container.
Definition iterable.h:694
Dynamic array container with amortized constant time operations.
Definition vector.h:43
bool all(coroutine::generator< TYPE > gen, Callback &&c)
Checks if all elements satisfy a predicate.
Definition generators.h:759

◆ all() [2/2]

template<typename F >
auto original::all ( F &&  f)

Creates an all-match pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe validation predicate.
Returns
A genPipe that checks if all elements satisfy the predicate.

Factory function for creating all-match operations.

◆ any() [1/2]

bool original::any ( coroutine::generator< TYPE gen,
Callback &&  c 
)

Checks if any element satisfies a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe generator to check.
cThe existence predicate.
Returns
true if at least one element satisfies the predicate, false otherwise.

Short-circuits on first true result. Returns false for empty generators.

Example:

auto vec = vector{1, 3, 4, 5};
auto gen = vec.generator();
bool has_even = any(gen, [](int x) { return x % 2 == 0; }); // Returns true
bool any(coroutine::generator< TYPE > gen, Callback &&c)
Checks if any element satisfies a predicate.
Definition generators.h:781

◆ any() [2/2]

template<typename F >
auto original::any ( F &&  f)

Creates an any-match pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe existence predicate.
Returns
A genPipe that checks if any element satisfies the predicate.

Factory function for creating any-match operations.

◆ collect()

template<typename TYPE , typename SET = hashSet<TYPE>>
requires ExtendsOf<set<TYPE, allocator<couple<const TYPE, const bool>>>, SET>
SET original::collect ( coroutine::generator< TYPE gen)

Collects generator elements into a set.

Template Parameters
TYPEThe type of elements in the generator.
SETThe set type to collect into (default: hashSet).
Parameters
genThe generator to collect from.
Returns
A set containing all unique elements from the generator.

Transforms a generator sequence into a set container, removing duplicates and providing fast lookup capabilities.

Example:

auto vec = vector{1, 2, 2, 3, 3, 3};
auto gen = vec.generator();
auto set = collect<int>(gen); // {1, 2, 3}

◆ count() [1/4]

template<typename = void>
auto original::count ( )

Creates a count pipe operation.

Returns
A genPipe that counts elements.

Factory function for creating count operations that can be used with the pipe operator.

◆ count() [2/4]

template<typename TYPE >
u_integer original::count ( coroutine::generator< TYPE gen)

Counts total elements in a generator.

Template Parameters
TYPEThe element type.
Parameters
genThe generator to count.
Returns
The number of elements in the generator.

Consumes the generator and returns the total element count.

Example:

auto vec = vector{1, 2, 3, 4, 5};
auto gen = vec.generator();
auto cnt = count(gen); // Returns 5
auto count()
Creates a count pipe operation.
Definition generators.h:964

◆ count() [3/4]

u_integer original::count ( coroutine::generator< TYPE gen,
Callback &&  c 
)

Counts elements satisfying a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe generator to count from.
cThe counting predicate.
Returns
The number of elements satisfying the predicate.

Counts only elements for which the predicate returns true.

Example:

auto vec = vector{1, 2, 3, 4, 5};
auto gen = vec.generator();
auto even_count = count(gen, [](int x) { return x % 2 == 0; }); // Returns 2

◆ count() [4/4]

template<typename F >
auto original::count ( F &&  f)

Creates a conditional count pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe counting predicate.
Returns
A genPipe that counts elements satisfying the predicate.

Factory function for creating conditional count operations.

◆ enumerate() [1/2]

template<typename = void>
auto original::enumerate ( )

Creates an enumerate pipe operation.

Returns
A genPipe that adds indices to elements.

Factory function for creating enumerate operations that can be used with the pipe operator.

◆ enumerate() [2/2]

template<typename TYPE >
coroutine::generator< couple< u_integer, TYPE > > original::enumerate ( coroutine::generator< TYPE gen)

Enumerates elements of a generator with their indices.

Template Parameters
TYPEThe type of elements in the generator.
Parameters
genThe generator to enumerate.
Returns
A generator yielding couples of index and element.

Creates a sequence of (index, value) pairs starting from index 0. Useful for tracking element positions during iteration.

Example:

auto vec = vector{10, 20, 30};
auto gen = vec.generator();
for (auto [i, val] : enumerate(gen)) {
std::cout << i << ": " << val << "\n"; // 0: 10, 1: 20, 2: 30
}
auto enumerate()
Creates an enumerate pipe operation.
Definition generators.h:916

◆ extract() [1/2]

coroutine::generator< TYPE > original::extract ( coroutine::generator< TYPE gen,
Callback &&  c 
)

Extracts elements that do not satisfy a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe source generator.
cThe exclusion predicate.
Returns
A generator yielding elements that do not satisfy the predicate.

Opposite of filters() - excludes elements that match the predicate and includes all others.

Example:

auto vec = vector{1, 2, 3, 4, 5};
auto gen = vec.generator();
auto not_evens = extract(gen, [](int x) { return x % 2 == 0; });
// Yields: 1, 3, 5
coroutine::generator< TYPE > extract(coroutine::generator< TYPE > gen, Callback &&c)
Extracts elements that do not satisfy a predicate.

◆ extract() [2/2]

template<typename F >
auto original::extract ( F &&  f)

Creates an extract pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe exclusion predicate.
Returns
A genPipe that applies the extraction.

Factory function for creating extract operations that can be used with the pipe operator.

◆ filters() [1/2]

coroutine::generator< TYPE > original::filters ( coroutine::generator< TYPE gen,
Callback &&  c 
)

Filters generator elements based on a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe source generator.
cThe filter predicate.
Returns
A generator yielding only elements that satisfy the predicate.

Creates a new generator that only includes elements for which the predicate returns true.

Example:

auto vec = vector{1, 2, 3, 4, 5};
auto gen = vec.generator();
auto evens = filters(gen, [](int x) { return x % 2 == 0; });
// Yields: 2, 4
coroutine::generator< TYPE > filters(coroutine::generator< TYPE > gen, Callback &&c)
Filters generator elements based on a predicate.

◆ filters() [2/2]

template<typename F >
auto original::filters ( F &&  f)

Creates a filter pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe filter predicate.
Returns
A genPipe that applies the filter.

Factory function for creating filter operations that can be used with the pipe operator.

◆ find() [1/2]

TYPE original::find ( coroutine::generator< TYPE gen,
Callback &&  c 
)

Finds the first element satisfying a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe generator to search.
cThe search predicate.
Returns
The first matching element, or default-constructed TYPE if not found.

Returns the first element that satisfies the predicate. If no element matches, returns a default-constructed value of type TYPE.

Example:

auto vec = vector{10, 20, 30, 40};
auto gen = vec.generator();
auto found = find(gen, [](int x) { return x > 25; }); // Returns 30
TYPE find(coroutine::generator< TYPE > gen, Callback &&c)
Finds the first element satisfying a predicate.
Definition generators.h:863

◆ find() [2/2]

template<typename F >
auto original::find ( F &&  f)

Creates an element-finding pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe search predicate.
Returns
A genPipe that finds the first matching element.

Factory function for creating element-finding operations.

◆ flatten() [1/2]

template<typename T , typename U >
auto original::flatten ( )

Creates a flatten pipe operation.

Template Parameters
TThe first element type in couples.
UThe second element type in couples.
Returns
A genPipe that flattens couples.

Factory function for creating flatten operations that can be used with the pipe operator.

◆ flatten() [2/2]

template<typename T , std::convertible_to< T > U>
coroutine::generator< T > original::flatten ( coroutine::generator< couple< T, U > >  gen)

Flattens a generator of couples into a single generator.

Template Parameters
TType of first element in couples.
UType of second element in couples (must be convertible to T).
Parameters
genGenerator of couples.
Returns
A generator yielding all elements from the couples sequentially.

Converts a generator of pairs into a flat sequence by yielding both elements of each couple in order.

Example:

auto vec = vector{couple{1, 2}, couple{3, 4}};
auto gen = vec.generator();
for (auto val : flatten(gen)) {
// Yields: 1, 2, 3, 4
}
Container for two heterogeneous elements.
Definition couple.h:55
auto flatten()
Creates a flatten pipe operation.
Definition generators.h:948

◆ group() [1/2]

template<typename T >
filterStream< T > original::group ( const filter< T > &  f)

Create grouped filterStream from single filter.

Template Parameters
TElement type
Parameters
fFilter to group
Returns
New grouped filterStream

Enables future operator precedence modifications

◆ group() [2/2]

template<typename T >
filterStream< T > original::group ( const filterStream< T > &  ofs)

Create grouped filterStream from existing stream.

Template Parameters
TElement type
Parameters
ofsfilterStream to group
Returns
New grouped filterStream

Use instead of parentheses for explicit precedence control

◆ join() [1/2]

template<typename T , std::convertible_to< T > U>
coroutine::generator< T > original::join ( coroutine::generator< T >  gen1,
coroutine::generator< U gen2 
)

Joins two generators of compatible types.

Template Parameters
TType of first generator and result elements.
UType of second generator elements (must be convertible to T).
Parameters
gen1First generator.
gen2Second generator.
Returns
A generator yielding all elements from gen1 followed by gen2.

Concatenates two generators, converting elements from the second generator to the type of the first.

Example:

auto vec1 = vector{1, 2, 3};
auto vec2 = vector{4, 5};
auto gen1 = vec1.generator();
auto gen2 = vec2.generator();
for (auto val : join(gen1, gen2)) {
// Yields: 1, 2, 3, 4, 5
}
coroutine::generator< T > join(coroutine::generator< T > gen1, coroutine::generator< U > gen2)
Joins two generators of compatible types.

◆ join() [2/2]

template<typename T , typename U >
auto original::join ( coroutine::generator< U gen2)

Creates a join pipe operation.

Template Parameters
TThe target element type.
UThe source element type.
Parameters
gen2The generator to join with.
Returns
A genPipe that joins generators.

Factory function for creating join operations that can be used with the pipe operator.

◆ list()

template<typename TYPE , template< typename > typename SERIAL = vector>
requires ExtendsOf<baseList<TYPE, allocator<TYPE>>, SERIAL<TYPE>>
SERIAL< TYPE > original::list ( coroutine::generator< TYPE gen)

Collects generator elements into a list container.

Template Parameters
TYPEThe type of elements in the generator.
SERIALThe list container type (default: vector).
Parameters
genThe generator to collect from.
Returns
A list container with all generator elements in order.

Converts a generator sequence into a concrete list container, preserving element order and allowing random access.

Example:

auto gen = someContainer.generator();
auto vec = list<int>(gen); // Creates vector<int> with all elements
Examples
/home/runner/work/original/original/src/core/vector.h.

◆ makeOwnerPtr()

template<typename T , typename DEL = deleter<T>, typename... Args>
ownerPtr< T, DEL > original::makeOwnerPtr ( Args &&...  args)

Creates a new ownerPtr managing a dynamically allocated object.

Template Parameters
TType of object to create and manage
DELDeleter policy type (default: deleter<T>)
ArgsArgument types for object construction
Parameters
argsArguments to forward to T's constructor
Returns
ownerPtr<T, DEL> owning the newly created object
Note
Provides exception-safe object creation
Warning
The returned ownerPtr has exclusive ownership of the object
// Create an ownerPtr managing a new MyClass constructed with args

◆ makeOwnerPtrArray()

template<typename T , typename DEL = deleter<T[]>, typename... Args>
ownerPtr< T, DEL > original::makeOwnerPtrArray ( u_integer  size,
Args &&...  args 
)

Creates a new ownerPtr managing a dynamically allocated array.

Template Parameters
TType of array elements to create
DELDeleter policy type (default: deleter<T[]>)
ArgsArgument types for array element initialization
Parameters
sizeNumber of elements in the array
argsArguments to forward to each element's constructor
Returns
ownerPtr<T, DEL> owning the newly created array
Note
Provides exception-safe array creation
Warning
The returned ownerPtr has exclusive ownership of the array
// Create an ownerPtr managing a new MyClass[10] array

◆ makeSequence()

template<u_integer NUM>
consteval auto original::makeSequence ( )
noexcept

Creates an index sequence of given length.

Template Parameters
NUMLength of the sequence to create
Returns
indexSequence instance with values 0..NUM-1
Examples
/home/runner/work/original/original/src/core/tuple.h.

◆ makeStrongPtr()

template<typename T , typename DEL = deleter<T>, typename... Args>
strongPtr< T, DEL > original::makeStrongPtr ( Args &&...  args)

Creates a new strongPtr managing a shared object.

Template Parameters
TType of object to create and manage
DELDeleter policy type (default: deleter<T>)
ArgsArgument types for object construction
Parameters
argsArguments to forward to T's constructor
Returns
strongPtr<T, DEL> sharing ownership of the new object
Note
Provides exception-safe object creation with shared ownership

The object will be destroyed when all strong references are released

// Create a strongPtr managing a new MyClass constructed with args

◆ makeStrongPtrArray()

template<typename T , typename DEL = deleter<T[]>, typename... Args>
strongPtr< T, DEL > original::makeStrongPtrArray ( u_integer  size,
Args &&...  args 
)

Creates a new strongPtr managing a shared array.

Template Parameters
TType of array elements to create
DELDeleter policy type (default: deleter<T[]>)
ArgsArgument types for array element initialization
Parameters
sizeNumber of elements in the array
argsArguments to forward to each element's constructor
Returns
strongPtr<T, DEL> sharing ownership of the new array
Note
Provides exception-safe array creation with shared ownership

The array will be destroyed when all strong references are released

// Create a strongPtr managing a new MyClass[10] array

◆ makeTuple() [1/2]

tuple< F_TYPE, S_TYPE > original::makeTuple ( const couple< F_TYPE, S_TYPE > &  cp)

Creates a tuple from a couple (copy version)

Template Parameters
F_TYPEFirst element type
S_TYPESecond element type
Parameters
cpCouple to convert to tuple
Returns
A new tuple containing the couple's elements
Note
Elements are copy-constructed from the couple.
Examples
/home/runner/work/original/original/src/core/tuple.h.

◆ makeTuple() [2/2]

tuple< F_TYPE, S_TYPE > original::makeTuple ( couple< F_TYPE, S_TYPE > &&  cp)

Creates a tuple from a couple (move version)

Template Parameters
F_TYPEFirst element type
S_TYPESecond element type
Parameters
cpCouple to convert to tuple
Returns
A new tuple containing the couple's elements
Note
Elements are move-constructed from the couple.

◆ max()

template<typename TYPE >
TYPE original::max ( TYPE  a,
TYPE  b 
)

Returns the larger of two given values.

Template Parameters
TYPEThe type of the input values.
Parameters
aThe first input value.
bThe second input value.
Returns
The larger of a and b.

This function compares the two values a and b, and returns the value that is greater. Uses operator> for comparison.

// Example usage:
double a = 3.5, b = 7.2;
double result = original::max(a, b); // result will be 7.2
int x = 10, y = 20;
int result2 = original::max(x, y); // result will be 20
TYPE max(TYPE a, TYPE b)
Returns the larger of two given values.

◆ min()

template<typename TYPE >
TYPE original::min ( TYPE  a,
TYPE  b 
)

Returns the smaller of two given values.

Template Parameters
TYPEThe type of the input values.
Parameters
aThe first input value.
bThe second input value.
Returns
The smaller of a and b.

This function compares the two values a and b, and returns the value that is smaller. Uses operator< for comparison.

// Example usage:
double a = 3.5, b = 7.2;
double result = original::min(a, b); // result will be 3.5
int x = 10, y = 20;
int result2 = original::min(x, y); // result will be 10
TYPE min(TYPE a, TYPE b)
Returns the smaller of two given values.

◆ none() [1/2]

Checks if no elements satisfy a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe generator to check.
cThe exclusion predicate.
Returns
true if no elements satisfy the predicate, false otherwise.

Short-circuits on first true result. Returns true for empty generators.

Example:

auto vec = vector{1, 3, 5, 7};
auto gen = vec.generator();
bool no_evens = none(gen, [](int x) { return x % 2 == 0; }); // Returns true

◆ none() [2/2]

template<typename F >
auto original::none ( F &&  f)

Creates a none-match pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe exclusion predicate.
Returns
A genPipe that checks if no elements satisfy the predicate.

Factory function for creating none-match operations.

◆ operator!() [1/2]

template<typename T >
filterStream< T > original::operator! ( const filter< T > &  f)

Create negated filterStream from filter.

Template Parameters
TElement type
Parameters
fFilter to negate
Returns
New filterStream with NOT operation
Note
Automatically adds grouping parentheses

◆ operator!() [2/2]

template<typename T >
filterStream< T > original::operator! ( const filterStream< T > &  ofs)

Create negated filterStream from existing stream.

Template Parameters
TElement type
Parameters
ofsfilterStream to negate
Returns
New negated filterStream
Note
Automatically adds grouping parentheses

◆ operator!=() [1/3]

template<typename T , typename DER , typename DEL >
bool original::operator!= ( const autoPtr< T, DER, DEL > &  ptr,
const std::nullptr_t &  null 
)

Inequality comparison with nullptr.

Template Parameters
TManaged object type
DERCRTP derived class type
DELDeleter policy type
Parameters
ptrautoPtr to compare
nullnullptr_t to compare against
Returns
true if the autoPtr is not empty (has a managed object)
Note
Equivalent to checking operator bool() of ptr

◆ operator!=() [2/3]

template<typename T >
bool original::operator!= ( const iterator< T > &  l_it,
const iterator< T > &  r_it 
)

Inequality comparison operator for iterators.

Template Parameters
TThe type of elements the iterator traverses.
Parameters
l_itLeft-hand side iterator.
r_itRight-hand side iterator.
Returns
True if the iterators point to different elements, false otherwise.
Note
This operation uses equalPtr for optimal constant-time comparison.

◆ operator!=() [3/3]

template<typename T , typename DER , typename DEL >
bool original::operator!= ( const std::nullptr_t &  null,
const autoPtr< T, DER, DEL > &  ptr 
)

Inequality comparison with nullptr (reversed operands)

Template Parameters
TManaged object type
DERCRTP derived class type
DELDeleter policy type
Parameters
ptrautoPtr to compare
nullnullptr_t to compare against
Returns
true if the autoPtr is not empty (has a managed object)
Note
Equivalent to checking operator bool() of ptr

◆ operator&()

template<typename ALLOC_ >
bitSet< ALLOC_ > original::operator& ( const bitSet< ALLOC_ > &  lbs,
const bitSet< ALLOC_ > &  rbs 
)

Bitwise AND operator for two bitSets.

Performs a bitwise AND operation between two bitSets.

Template Parameters
ALLOC_Allocator type
Parameters
lbsLeft bitSet
rbsRight bitSet
Returns
Result of bitwise AND operation

◆ operator&&() [1/3]

template<typename T >
filterStream< T > original::operator&& ( const filter< T > &  f,
const filterStream< T > &  ofs 
)

AND operator between filter and filterStream.

Template Parameters
TElement type
Parameters
fFilter operand
ofsfilterStream operand
Returns
New combined filterStream

◆ operator&&() [2/3]

template<typename T >
filterStream< T > original::operator&& ( const filter< T > &  f1,
const filter< T > &  f2 
)

Create AND filterStream from two filters.

Template Parameters
TElement type
Parameters
f1First filter operand
f2Second filter operand
Returns
New filterStream with AND operation

◆ operator&&() [3/3]

template<typename T >
filterStream< T > original::operator&& ( const filterStream< T > &  ofs,
const filter< T > &  f 
)

AND operator between filterStream and filter.

Template Parameters
TElement type
Parameters
ofsfilterStream operand
fFilter operand
Returns
New combined filterStream

◆ operator*() [1/2]

Parameters
dDuration to multiply
factorMultiplication factor
Returns
Product of duration and factor

◆ operator*() [2/2]

Parameters
factorMultiplication factor
dDuration to multiply
Returns
Product of factor and duration

◆ operator+() [1/7]

template<typename T >
auto original::operator+ ( const iterator< T > &  it,
integer  steps 
) -> iterator< T > *

Adds a number of steps to the iterator's current position and returns a new iterator.

Template Parameters
TThe type of the elements the iterator will traverse.
Parameters
itThe iterator to move.
stepsThe number of steps to move forward.
Returns
A new iterator that is moved forward by the specified steps from the original iterator.

This operator does not modify the original iterator, but creates a new one that is advanced by steps positions.

◆ operator+() [2/7]

Parameters
dDuration to add
tUTCTime
Returns
New UTCTime after addition

◆ operator+() [3/7]

Parameters
lhsLeft operand
rhsRight operand
Returns
Sum of durations

◆ operator+() [4/7]

Parameters
pTime point
dDuration to add
Returns
New time point after addition

◆ operator+() [5/7]

Parameters
tUTCTime
dDuration to add
Returns
New UTCTime after addition

◆ operator+() [6/7]

template<typename T >
transformStream< T > original::operator+ ( const transform< T > &  t,
const transformStream< T > &  ots 
)
related

Creates new stream by prefixing existing stream.

Creates new stream from transformation and existing stream.

Template Parameters
TData type
Parameters
tTransformation to prepend
otsOriginal stream
Returns
New stream applying t then ots's transformations

◆ operator+() [7/7]

template<typename T >
transformStream< T > original::operator+ ( const transform< T > &  t1,
const transform< T > &  t2 
)
related

Creates new transformation stream from two transforms.

Creates new stream from two transformations.

Template Parameters
TData type
Parameters
t1First transformation
t2Second transformation
Returns
New stream applying t1 then t2

◆ operator-() [1/7]

template<typename T >
auto original::operator- ( const iterator< T > &  it,
integer  steps 
) -> iterator< T > *

Subtracts a number of steps from the iterator's current position and returns a new iterator.

Template Parameters
TThe type of the elements the iterator will traverse.
Parameters
itThe iterator to move.
stepsThe number of steps to move backward.
Returns
A new iterator that is moved backward by the specified steps from the original iterator.

This operator does not modify the original iterator, but creates a new one that is moved backward by steps positions.

◆ operator-() [2/7]

Parameters
dDuration to negate
Returns
Negated duration

◆ operator-() [3/7]

Parameters
lhsLeft operand
rhsRight operand
Returns
Difference of durations

◆ operator-() [4/7]

Parameters
lhsLeft operand
rhsRight operand
Returns
Duration between points

◆ operator-() [5/7]

Parameters
pTime point
dDuration to subtract
Returns
New time point after subtraction

◆ operator-() [6/7]

Parameters
lhsLeft operand
rhsRight operand
Returns
Duration between UTCTimes

◆ operator-() [7/7]

Parameters
tUTCTime
dDuration to subtract
Returns
New UTCTime after subtraction

◆ operator/() [1/2]

Parameters
dDuration to divide
factorDivision factor
Returns
Quotient of duration and factor

◆ operator/() [2/2]

Parameters
lhsLeft operand
rhsRight operand
Returns
Quotient of durations

◆ operator<<()

std::ostream & original::operator<< ( std::ostream &  os,
const printable p 
)
inline

Stream insertion operator for printable objects.

Parameters
osOutput stream
pPrintable object
Returns
Modified output stream

Enables direct streaming of printable objects to output streams. Uses the object's toString(false) method to generate the output without trailing newline.

std::cout << obj; // Outputs "MyClass(custom_data)"
std::cout << obj << std::endl; // Adds newline separately

◆ operator==() [1/3]

template<typename T , typename DER , typename DEL >
bool original::operator== ( const autoPtr< T, DER, DEL > &  ptr,
const std::nullptr_t &  null 
)

Equality comparison with nullptr.

Template Parameters
TManaged object type
DERCRTP derived class type
DELDeleter policy type
Parameters
ptrautoPtr to compare
nullnullptr_t to compare against
Returns
true if the autoPtr is empty (no managed object)
Note
Equivalent to checking !operator bool() of ptr

◆ operator==() [2/3]

template<typename T >
bool original::operator== ( const iterator< T > &  l_it,
const iterator< T > &  r_it 
)

Equality comparison operator for iterators.

Template Parameters
TThe type of elements the iterator traverses.
Parameters
l_itLeft-hand side iterator.
r_itRight-hand side iterator.
Returns
True if the iterators point to the same element, false otherwise.
Note
This operation uses equalPtr for optimal constant-time comparison.

◆ operator==() [3/3]

template<typename T , typename DER , typename DEL >
bool original::operator== ( const std::nullptr_t &  null,
const autoPtr< T, DER, DEL > &  ptr 
)

Equality comparison with nullptr (reversed operands)

Template Parameters
TManaged object type
DERCRTP derived class type
DELDeleter policy type
Parameters
ptrautoPtr to compare
nullnullptr_t to compare against
Returns
true if the autoPtr is empty (no managed object)
Note
Equivalent to checking !operator bool() of ptr

◆ operator^()

template<typename ALLOC_ >
bitSet< ALLOC_ > original::operator^ ( const bitSet< ALLOC_ > &  lbs,
const bitSet< ALLOC_ > &  rbs 
)

Bitwise XOR operator for two bitSets.

Performs a bitwise XOR operation between two bitSets.

Template Parameters
ALLOC_Allocator type
Parameters
lbsLeft bitSet
rbsRight bitSet
Returns
Result of bitwise XOR operation

◆ operator|() [1/8]

template<typename T , typename Callback >
auto original::operator| ( async::future< T >  f,
Callback &&  c 
)

Pipe operator for chaining asynchronous computations.

This operator dynamically attaches a new callback to an already running future. The callback will be executed once the asynchronous result becomes available. Unlike a lazy pipeline builder, this version modifies the execution flow immediately.

Template Parameters
TResult type of the future
CallbackCallable type, must accept T or T&& (depending on constness and value category)
Parameters
fSource future containing the asynchronous result
cCallback function to process the result
Returns
A new future holding the result of the callback

◆ operator|() [2/8]

Pipe operator specialization for future<void>

This operator dynamically attaches a new callback to an already running future<void>. The callback will be executed once the asynchronous task completes. This is suitable for chaining tasks that do not produce a value. Execution is immediate, not deferred.

Template Parameters
CallbackCallable type, must accept no arguments
Parameters
fSource future<void> representing completion of an asynchronous task
cCallback function to execute after completion
Returns
A new future holding the result of the callback

◆ operator|() [3/8]

Lazy pipe operator for chaining promise computations.

This operator creates a lazy composition of promises, where the computation is only executed when the resulting promise is run. Unlike the dynamic pipe operator for futures, this creates a new promise that combines both computations without immediate execution.

The pipeline is built lazily - no computation occurs until run() is called on the resulting promise. This allows for building complex computation graphs without immediate execution overhead.

Template Parameters
TResult type of the source promise
Callback1Type of the source promise's computation
Callback2Type of the continuation callback
Parameters
pSource promise containing the initial computation
cCallback function to process the result of the source promise
Returns
A new promise that will execute both computations in sequence when run
Note
The source promise is moved into the resulting promise, making it invalid after this operation. The continuation callback must accept the result type T.

◆ operator|() [4/8]

Lazy pipe operator specialization for promise<void>

This operator creates a lazy composition of void-returning promises, where the first computation completes before the second begins. The pipeline executes sequentially but only when the resulting promise is run.

Useful for building sequences of side-effectful operations that need to execute in order but don't produce values.

Template Parameters
Callback1Type of the source promise's computation
Callback2Type of the continuation callback
Parameters
pSource promise containing the initial void computation
cCallback function to execute after the source promise completes
Returns
A new promise that will execute both computations in sequence when run
Note
The source promise is moved into the resulting promise, making it invalid after this operation. The continuation callback must accept no arguments.

◆ operator|() [5/8]

Pipe operator for chaining computations on sharedFuture.

This operator dynamically attaches a new callback to an already running sharedFuture. Unlike lazy task builders, the continuation is immediately scheduled to run once the sharedFuture produces a value. This makes it possible to share and extend asynchronous results across multiple consumers.

Template Parameters
TResult type of the sharedFuture
CallbackCallable type, must accept T const& or T (depending on design)
Parameters
sfSource sharedFuture containing the asynchronous result
cCallback function to process the result
Returns
A new future holding the result of the callback

◆ operator|() [6/8]

Pipe operator specialization for sharedFuture<void>

This operator dynamically attaches a new callback to an already running sharedFuture<void>. The callback will be executed once the asynchronous task completes. Since sharedFuture can be copied, multiple consumers can each dynamically attach their own continuations.

Template Parameters
CallbackCallable type, must accept no arguments
Parameters
sfSource sharedFuture<void> representing completion of an asynchronous task
cCallback function to execute after completion
Returns
A new future holding the result of the callback

◆ operator|() [7/8]

template<typename ALLOC_ >
bitSet< ALLOC_ > original::operator| ( const bitSet< ALLOC_ > &  lbs,
const bitSet< ALLOC_ > &  rbs 
)

Bitwise OR operator for two bitSets.

Performs a bitwise OR operation between two bitSets.

Template Parameters
ALLOC_Allocator type
Parameters
lbsLeft bitSet
rbsRight bitSet
Returns
Result of bitwise OR operation

◆ operator|() [8/8]

Pipe operator for generator operations.

Template Parameters
TYPEThe generator element type.
FThe pipe operation type.
Parameters
genThe source generator.
pThe pipe operation to apply.
Returns
The result of applying the pipe operation to the generator.

Enables fluent chaining of generator operations using the | operator.

Example:

auto transforms(coroutine::generator< TYPE > gen, Callback &&c) -> coroutine::generator< std::invoke_result_t< Callback, TYPE > >
Transforms generator elements using a callable.
Definition generators.h:686

◆ operator||() [1/3]

template<typename T >
filterStream< T > original::operator|| ( const filter< T > &  f,
const filterStream< T > &  ofs 
)

OR operator between filter and filterStream.

Template Parameters
TElement type
Parameters
fFilter operand
ofsfilterStream operand
Returns
New combined filterStream

◆ operator||() [2/3]

template<typename T >
filterStream< T > original::operator|| ( const filter< T > &  f1,
const filter< T > &  f2 
)

Create OR filterStream from two filters.

Template Parameters
TElement type
Parameters
f1First filter operand
f2Second filter operand
Returns
New filterStream with OR operation

◆ operator||() [3/3]

template<typename T >
filterStream< T > original::operator|| ( const filterStream< T > &  ofs,
const filter< T > &  f 
)

OR operator between filterStream and filter.

Template Parameters
TElement type
Parameters
ofsfilterStream operand
fFilter operand
Returns
New combined filterStream

◆ operator~()

template<typename ALLOC_ >
bitSet< ALLOC_ > original::operator~ ( const bitSet< ALLOC_ > &  bs)

Bitwise NOT operator for a bitSet.

Performs a bitwise NOT operation on a bitSet.

Template Parameters
ALLOC_Allocator type
Parameters
bsbitSet to negate
Returns
Result of bitwise NOT operation

◆ position() [1/2]

u_integer original::position ( coroutine::generator< TYPE gen,
Callback &&  c 
)

Finds the position of the first element satisfying a predicate.

Template Parameters
TYPEThe element type.
CallbackThe predicate function type.
Parameters
genThe generator to search.
cThe search predicate.
Returns
The index of the first matching element, or the total count if not found.

Returns the 0-based index of the first element that satisfies the predicate. If no element matches, returns the total number of elements processed.

Example:

auto vec = vector{10, 20, 30, 40};
auto gen = vec.generator();
auto pos = position(gen, [](int x) { return x > 25; }); // Returns 2
u_integer position(coroutine::generator< TYPE > gen, Callback &&c)
Finds the position of the first element satisfying a predicate.

◆ position() [2/2]

template<typename F >
auto original::position ( F &&  f)

Creates a position-finding pipe operation.

Template Parameters
FThe predicate function type.
Parameters
fThe search predicate.
Returns
A genPipe that finds the position of the first matching element.

Factory function for creating position-finding operations.

◆ pow()

auto original::pow ( floating  base,
integer  exp 
)
inline

Returns the result of raising a base to an exponent.

Parameters
baseThe base value.
expThe exponent value.
Returns
The result of base raised to the power of exp.
Exceptions
valueErrorIf base is 0 and exp is less than or equal to 0.

This function performs exponentiation by iterating exp times and multiplying the base. If exp is negative, it computes the reciprocal of the result. An exception is thrown if base is 0 and exp is non-positive.

Note
Uses iterative multiplication. For large exponents, consider specialized exponentiation algorithms for better performance.
// Example usage:
double base = 2.0;
int exp = 3;
double result = original::pow(base, exp); // result will be 8.0
// For negative exponent:
exp = -2;
result = original::pow(base, exp); // result will be 0.25
// Throws valueError:
result = original::pow(0.0, -1); // throws valueError
floating pow(floating base, integer exp)
Returns the result of raising a base to an exponent.
Definition maths.h:200

◆ rangesOf()

template<std::integral INTEGER = int>
coroutine::generator< INTEGER > original::rangesOf ( INTEGER  start,
INTEGER  end,
INTEGER  steps = 1 
)

Generates a sequence of integers from start to end (exclusive) with a given steps.

This function returns a coroutine-based generator that yields integer values starting from start, incrementing or decrementing by steps, until end is reached (exclusive). Supports both forward and backward iteration with positive and negative step sizes.

Template Parameters
INTEGERThe integer type (defaults to int).
Parameters
startThe starting value (inclusive).
endThe ending value (exclusive).
stepsThe step size between values (default is 1).
Returns
A generator that yields the sequence of integers.
Note
If steps is zero or the range is invalid (e.g., start > end with positive step), the generator will immediately complete without yielding any values.
The generator uses coroutines for lazy evaluation, making it memory efficient for large ranges.
// Example usage:
// Forward range
for (int i : original::rangesOf(1, 5)) {
std::cout << i << " "; // Output: 1 2 3 4
}
// Backward range
for (int i : original::rangesOf(5, 1, -1)) {
std::cout << i << " "; // Output: 5 4 3 2
}
// Custom step size
for (int i : original::rangesOf(0, 10, 2)) {
std::cout << i << " "; // Output: 0 2 4 6 8
}
// Empty ranges
for (int i : original::rangesOf(5, 1)) {
// No iteration - range is invalid with default step=1
}
Main namespace for the project Original.
Definition algorithms.h:21
coroutine::generator< INTEGER > rangesOf(INTEGER start, INTEGER end, INTEGER steps=1)
Generates a sequence of integers from start to end (exclusive) with a given steps.

◆ reverseIndexSequenceImpl()

template<u_integer... Indices>
consteval auto original::reverseIndexSequenceImpl ( indexSequence< Indices... >  seq)

Implementation detail for reversing an index sequence.

Template Parameters
IndicesSequence indices to reverse
Parameters
seqThe index sequence to reverse
Returns
Reversed index sequence

◆ skip() [1/2]

template<typename TYPE >
coroutine::generator< TYPE > original::skip ( coroutine::generator< TYPE gen,
u_integer  n 
)

Skips the first n elements of a generator.

Template Parameters
TYPEThe element type.
Parameters
genThe source generator.
nNumber of elements to skip.
Returns
A generator yielding elements after the first n.

Discards the first n elements and yields the remainder of the sequence.

Example:

auto vec = vector{1, 2, 3, 4, 5};
auto gen = vec.generator();
for (auto val : skip(gen, 2)) {
// Yields: 3, 4, 5
}
coroutine::generator< TYPE > skip(coroutine::generator< TYPE > gen, u_integer n)
Skips the first n elements of a generator.

◆ skip() [2/2]

template<typename = void>
auto original::skip ( u_integer  n)

Creates a skip pipe operation.

Parameters
nNumber of elements to skip.
Returns
A genPipe that skips the first n elements.

Factory function for creating skip operations that can be used with the pipe operator.

◆ take() [1/2]

template<typename TYPE >
coroutine::generator< TYPE > original::take ( coroutine::generator< TYPE gen,
u_integer  n 
)

Takes the first n elements from a generator.

Template Parameters
TYPEThe element type.
Parameters
genThe source generator.
nNumber of elements to take.
Returns
A generator yielding at most n elements.

Limits the output to the first n elements of the input generator. Stops early if the input generator has fewer than n elements.

Example:

auto vec = vector{1, 2, 3, 4, 5};
auto gen = vec.generator();
for (auto val : take(gen, 3)) {
// Yields: 1, 2, 3
}
coroutine::generator< TYPE > take(coroutine::generator< TYPE > gen, u_integer n)
Takes the first n elements from a generator.

◆ take() [2/2]

template<typename = void>
auto original::take ( u_integer  n)

Creates a take pipe operation.

Parameters
nNumber of elements to take.
Returns
A genPipe that takes the first n elements.

Factory function for creating take operations that can be used with the pipe operator.

◆ transforms() [1/2]

auto original::transforms ( coroutine::generator< TYPE gen,
Callback &&  c 
) -> coroutine::generator<std::invoke_result_t<Callback, TYPE>>

Transforms generator elements using a callable.

Template Parameters
TYPEThe input element type.
CallbackThe transformation function type.
Parameters
genThe source generator.
cThe transformation callable.
Returns
A generator yielding transformed elements.

Applies a transformation function to each element of the input generator, producing a new generator with the transformed values.

Example:

auto vec = vector{1, 2, 3};
auto gen = vec.generator();
auto squared = transforms(gen, [](int x) { return x * x; });
// Yields: 1, 4, 9

◆ transforms() [2/2]

template<typename F >
auto original::transforms ( F &&  f)

Creates a transform pipe operation.

Template Parameters
FThe transformation function type.
Parameters
fThe transformation function.
Returns
A genPipe that applies the transformation.

Factory function for creating transform operations that can be used with the pipe operator.

Example:

auto double_transform = transforms([](int x) { return x * 2; });
auto result = gen | double_transform;

◆ zip()

template<typename T , typename U >
coroutine::generator< couple< T, U > > original::zip ( coroutine::generator< T >  gen1,
coroutine::generator< U gen2 
)

Zips two generators into pairs.

Template Parameters
TType of first generator elements.
UType of second generator elements.
Parameters
gen1First generator.
gen2Second generator.
Returns
A generator yielding couples of elements from both generators.

Pairs elements from two generators positionally. Stops when either generator is exhausted.

Example:

auto vec1 = vector{1, 2, 3};
auto vec2 = vector{'a', 'b', 'c'};
auto gen1 = vec1.generator();
auto gen2 = vec2.generator();
for (auto [num, ch] : zip(gen1, gen2)) {
// Yields: (1, 'a'), (2, 'b'), (3, 'c')
}
coroutine::generator< couple< T, U > > zip(coroutine::generator< T > gen1, coroutine::generator< U > gen2)
Zips two generators into pairs.

◆ zipWith()

template<typename U >
auto original::zipWith ( coroutine::generator< U gen2)

Creates a zipWith pipe operation.

Template Parameters
UThe element type of the second generator.
Parameters
gen2The generator to zip with.
Returns
A genPipe that zips generators.

Factory function for creating zip operations that can be used with the pipe operator.

Variable Documentation

◆ E

constexpr l_floating original::E = 2.7182818284590452353602874713526624977572470937000
constexpr

The mathematical constant E (Euler's number).

This is the base of the natural logarithm, approximately equal to 2.71828. It is used in various mathematical, scientific, and engineering applications, particularly in exponential growth and decay models, as well as in complex analysis.

Note
Defined with high precision for floating-point calculations.
Examples
/home/runner/work/original/original/src/core/tuple.h.

◆ PI

constexpr l_floating original::PI = 3.1415926535897932384626433832795028841971693993751
constexpr

The mathematical constant PI (π).

This is the ratio of a circle's circumference to its diameter, approximately equal to 3.14159. It is used in geometry, trigonometry, and many other mathematical fields, especially when dealing with circular or spherical shapes.

Note
Defined with high precision for floating-point calculations.