This is release 5 of the DFF Library - commonly used units containing classes
used in many programs throughout DelphiForFun.
Changes with this version:
-----------------------------
MathsLib unit added - misc math related functions and procedures
----------------------------------------------------------------
function GetNextPandigital
function IsPolygonal
function GeneratePentagon
function IsPentagon
function isSquare
function isCube
function isPalindrome
function GetEulerPhi
function IntPower
function gcd2
function GCDMany
function LCMMany
procedure ContinuedFraction
function Factorial
TPrimes = Object relating to prime numbers
Prime - Array of primes up 1,000,000
function IsPrime - Is N prime?
function GetNextPrime - Next prime > N
function GetPrevPrime - First prime < N
procedure GetFactors - Get all prime factors of N
Factors - Array of factors of N, set by GetFactors
function GetNthPrime - Get prime of rank R
procedure GetCanonicalFactors - get ccanonical prime factors of N
CanonicalFactors - Array of factors of N Cacnonical form (integer pairs)
procedure GetDivisors - Get all divisors of N
Divisors - Array of divisor of N
function Getnbrdivisors - Number of divisors of N
Seven procedures added to DFFUtils:
-----------------------------------
RotateStrLeft - Move 1st character to end of string
SortStrUp - Sort string characters ascending
SortStrDown - Sort string charactes descending
StrToFloatDef - Convert string to extended with default value if error
DeleteGridRow - Delete row N of Stringgrid
InsertgridRow - Insert new row after N in Stringgrid
Sortgrid - Sort Stringgrid ascending on column N
UBigIntsV2 bug fix to TInteger
------------------------------
Error in Modulo operator corrected in TInteger class in
UBigIntsV2 (x modolo y where x<0 and x<y returned -x
(a positive value) instead of x (the original negative value).
Units from previous version:
----------------------------
UBigIntsV2 TInteger - Big Integer definition and arithmetic
UComboV2 ComboSet class for computing combinations and permutations
UIntList.pas An Integer list version of TStringlist
UTGraphSearch Defines a structure to contain Nodes and Edges for a graph. Search procedures from a given source a given destination nodes for Depth first search, Breadth first search, and Dijkstra Shortest path search are included.
DFFUtils Support procedures:
AdjustGridSize
Reformatmemo
SetmemoMargins
UCardComponent A TCards class that can display cards images, front and back, shuffle a deck, etc.
UGeometry Geometrical functions
Line returns a line structuire from two points.
IntDistance returns integer distance between two points.
LinesIntersect (tests intersection of two line segments)
PointInPoly - tests if point is internal to a given polygon
PointPerLine - Determines line perpendicular to given point
through a given line.
PerpDistance - returns perpendicular distance from point to
given line.
Angled line from line - determines line at given angle from a point
on a given line.