Skip to content

A collection of various C++ utilities including vectors, arrays, strings, mathematics, and general C++ helpers

Notifications You must be signed in to change notification settings

GeorgeSeif/CPP-Utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

CPP-Utilities

A collection of various C++ utility functions to help with programming including vectors, arrays, strings, mathematics, and general C++ helpers

Note that C++ 11 is required

Below is a list of all of the included constants and functions.

Constants

Mathematics and Science constants

  1. The constant PI
  2. Euler's constant
  3. Speed of light

String constants

  1. Single space
  2. Comma
  3. Back slash
  4. Period
  5. Equals sign

C++ Helper Functions

  1. Logging function
  2. Print vector
  3. Print pair
  4. Print boolean as TRUE or FALSE

Array Utility Functions

  1. Insertion Sort Algorithm
  2. Merge Sort Algorithm
  3. Mean value of array or vector
  4. Median value of array or vector
  5. Standard deviation of array or vector
  6. Intersection between two arrays or vectors
  7. Check if a vector contains a certain value

Math Utility Functions

  1. Quadratic equation solver
  2. Magnitude of Complex Number
  3. Phase of Complex Number
  4. Factorial
  5. Number of possible permutations
  6. Number of possible combinations
  7. Euclidean Distance 2D
  8. RANSAC line fitting 2D
  9. Vector data normalization
  10. Linear Regression

String Utility Functions

  1. Convert to lower case
  2. Convert to upper case
  3. Converts double/float types to strings with set number of significant digits
  4. Delete all spaces within a string
  5. Trim all spaces on the left side of a string
  6. Trim all spaces on the right side of a string
  7. Trim all spaces on the two ends (left and right) of a string
  8. Extract all seperate word tokens in a string into a vector of strings
  9. Count the number of occurences of a substring in a string
  10. Get all of the substring indices from a string

About

A collection of various C++ utilities including vectors, arrays, strings, mathematics, and general C++ helpers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages