internal static DoubleDataFrameColumn ComputeDiscountPrice(DoubleDataFrameColumn price, DoubleDataFrameColumn discount) { if (price.Length != discount.Length) { throw new ArgumentException("Arrays need to be the same length"); } return(price * (1 - discount)); }
internal static DoubleDataFrameColumn ComputeTotal(DoubleDataFrameColumn price, DoubleDataFrameColumn discount, DoubleDataFrameColumn tax) { if ((price.Length != discount.Length) || (price.Length != tax.Length)) { throw new ArgumentException("Arrays need to be the same length"); } return(price * (1 - discount) * (1 + tax)); }