Hide Comments
Hide Comments

TRSCustomChartFunction.GreatestCommonDivisor(TRSCustomChart,Integer,Integer,TDateTime,Integer) Method

Comments (0)

Calculates the greatest common divisor (gcd) of the SourceChart Values and returns the value. The SourceChart Values are rounded into integers and the GCD calculated from this array. The GCD of two or more integers, when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4.

Namespace: RSChartFunction

expandingSyntax

Delphi

public
  class function GreatestCommonDivisor(const SourceChart: TRSCustomChart;
  IndexLow, IndexHigh: Integer; var TimeStamp: TDateTime;
  SourceDim: Integer): TRSChartValueType; overload;
 

Parameters

SourceChart

Type: TRSCustomChart

Chart to calculate the GCD from

IndexLow

Type: Integer

Lower bounds index into the SourceChart

IndexHigh

Type: Integer

Upper bounds index into the SourceChart
 

TimeStamp

Type: TDateTime

TimeStamp of the new value

SourceDim

Type: Integer

Return Value

Type: TRSChartValueType

expandingRemarks

Note that this function is a class procedure so it may be called even if the TRSCustomChartFunction is not instantiated.

The function can also be called by custom functions. For example, you could create a custom function that calls this function and then does something with the result

expandingSee Also

Comments (0)

RiverSoftAVG Charting Component Suite (RCCS) © 2005-2015, Thomas G. Grubb