public static ValueTerm Scaling(ValueTerm factor, ValueTerm value) { if (factor.Dimension != 1) { throw new ArgumentException("Dimension of 'factor' is not 1."); } return(TermsWrapped.Product(factor, value)); }
// common operations public static ValueTerm Sum(ValueTerm value1, ValueTerm value2) { if (value1.Dimension != value2.Dimension) { throw new ArgumentException("Dimensions of 'value1' and 'value2' do not match."); } return(TermsWrapped.Sum(value1, value2)); }
public static ValueTerm ArcTangent(ValueTerm value) { if (value.Dimension != 1) { throw new ArgumentException("Dimension of 'value' is not 1."); } return(TermsWrapped.ArcTangent(value)); }
public static ValueTerm Angle(ValueTerm value) { if (value.Dimension != 2) { throw new ArgumentException("Dimension of 'value' is not 2."); } return(TermsWrapped.ArcTangent2(value.Select(1), value.Select(0))); }
public static ValueTerm DotProduct(ValueTerm value1, ValueTerm value2) { if (value1.Dimension != value2.Dimension) { throw new ArgumentException("Dimensions of 'value1' and 'value2' do not match."); } return(TermsWrapped.MatrixProduct(TermsWrapped.Transpose(value1), value2)); }
public void Dispose() { if (!disposed) { disposed = true; TermsWrapped.DisposeValue(this); GC.SuppressFinalize(this); } }
public static ValueTerm Product(ValueTerm value1, ValueTerm value2) { if (value1.Dimension != 1) { throw new ArgumentException("Dimension of 'value1' is not 1."); } if (value2.Dimension != 1) { throw new ArgumentException("Dimension of 'value2' is not 1."); } return(TermsWrapped.Product(value1, value2)); }
public static ValueTerm Exponentiation(ValueTerm @base, ValueTerm exponent) { if (@base.Dimension != 1) { throw new ArgumentException("Dimension of 'base' is not 1."); } if (exponent.Dimension != 1) { throw new ArgumentException("Dimension of 'exponent' is not 1."); } return(TermsWrapped.Exponentiation(@base, exponent)); }
public static ValueTerm Selection(ValueTerm value, int index) { return(TermsWrapped.Selection(value, index)); }
// vectors public static ValueTerm Vector(IEnumerable <ValueTerm> values) { return(TermsWrapped.Vector(values)); }
public static ValueTerm Application(FunctionTerm function, ValueTerm value) { return(TermsWrapped.Application(function, value)); }
public static FunctionTerm Abstraction(ValueTerm variable, ValueTerm value) { return(TermsWrapped.Abstraction(variable, value)); }
public override string ToString() { return(TermsWrapped.ValueToString(this)); }
public IEnumerable <FunctionTerm> GetDerivatives() { return(TermsWrapped.FunctionDerivatives(this)); }
// lambda terms public static ValueTerm Variable(string name, int dimension) { return(TermsWrapped.Variable(name, dimension)); }
public ValueTerm Simplify() { return(TermsWrapped.ValueSimplify(this)); }
public IEnumerable <double> Evaluate() { return(TermsWrapped.ValueEvaluate(this)); }
// constants public static ValueTerm Constant(double value) { return(TermsWrapped.Constant(value)); }
public override string ToString() { return(TermsWrapped.FunctionToString(this)); }
public FunctionTerm Simplify() { return(TermsWrapped.FunctionSimplify(this)); }