Vertesaur.Generation.Expressions.SquaredDistanceExpression.SquaredDistanceExpression C# (CSharp) Méthode

SquaredDistanceExpression() public méthode

Creates a new dot product expression.
public SquaredDistanceExpression ( Expression components, IExpressionGenerator reductionExpressionGenerator = null ) : System
components System.Linq.Expressions.Expression The ordered components of the two vectors in the order of first vectors coordinates then second vectors coordinates (ex: x0,y0,x1,y1).
reductionExpressionGenerator IExpressionGenerator The optional expression generator that can be used to produce reduced expressions.
Résultat System
        public SquaredDistanceExpression(Expression[] components, IExpressionGenerator reductionExpressionGenerator = null)
            : base(reductionExpressionGenerator) {
            if (null == components) throw new ArgumentNullException("components");
            if (components.Length == 0) throw new ArgumentException("Must have at least 1 component.", "components");
            if (components.Length % 2 != 0) throw new ArgumentException("Must have an even number of components.", "components");
            Contract.Requires(components.All(x => null != x));

            Components = components; // TODO: clone?

            if (Components.ContainsNull())
                throw new ArgumentException("All components expressions must be non null.", "components");
        }