-
Notifications
You must be signed in to change notification settings - Fork 0
xstdlib
Brian W. Mulligan edited this page May 12, 2016
·
4 revisions
xstdlib consists of the following routines
- xTest_Prime: test if a number is a prime number
- xrand_Set_Type: select random number generator
- xrand_Get_Type: get random number generator type
- xsrand: seed the random number generator
- xrsrand: randomly seed the random number generator
- xrand: generate a random number between -(XRANDMAX - 1) and (XRANDMAX - 1)
- xrand_d: generate number between 0 and 1
- xrand_dm: genearte number between -1 and 1
- xrand_gauss_bm: generates two gaussian random numbers with mean = 0 and standard deviation 1
- xrand_gauss: generate a single gaussian random number with given mean and standard deviation
- xrandmax, XRANDMAX: current maximum value of random number generator
- XRoundNearest: round to nearest value
- XRoundUp: round up to nearest value
- XRoundDown: round down to nearest value
- XRound2: Round an unsigned integer to the nearest power of 2 (i.e. 1->1, 2->2, 3->4)
- XRound4k: Round an unsigned integer to the nearest multiple of 4096
- XSTRING: similar to std::string; meant to seamlessly handle multi-byte characters
- xIsANumber: determines if a string starts with a number
- xIsAScientificNumber: determines if a string starts with a number in scientific notation (x.xxe+-yyy) or (x.xxd+-yyy)
- xIsWhitespace: determines if a string starts with whitespace (tabs or spaces)
- xPassWhitespace: parses a string and returns pointer to first non-whitespace character
- xPassNumber: parses a string and returns pointer to first non-number character. Can process scientific or decimal values
- xPassSeparator: parses a string and returns pointer to first non-separator character
- xPassString: parses a string and returns pointer to end of string. String is delimited by user specified identifier such as ""
- xGetNumberFromEndOfString: returns the value at the end of a string instead of the beginning.
- xGetLastWordInString: returns the last word in a string
- xParse_Command_Line_Data_Ptr: looks for a particular command line parameter and returns the value
- xParse_Command_Line_Exists: determines if a command line parameter exists
- xParse_Command_Line_Dbl: returns the value of a command line parameter with a floating point value
- xParse_Command_Line_Bool: returns the value of a command line parameter with a boolean value
- xParse_Command_Line_UInt: returns the value of a command line parameter with an unsigned integer value
- xParse_Command_Line_Int: returns the value of a command line parameter with an integer value
- xParse_Command_Line_String: returns the value of a command line parameter with a string value
- xRomanNumeralGenerator: returns a string with roman numeral representation of an integer value
- xGet_Element_Symbol: returns the element symbol based on atomic number
- xChoose_Allocation_Size_Word_Aligned: returns an allocation size that is word or page aligned
- xChoose_Allocation_Size_Word_Aligned_Quiet: simliar to xChoose_Allocation_Size_Word_Aligned but won't output nasty looking error messages
- XMin and XMax: returns the minimum and maximum of a large set of values