public override Value Perform(Value left, Value right)
{
if (left is NumericValue == false)
{
throw new YAMPOperationInvalidException(Op, left);
}
if (right is NumericValue == false)
{
throw new YAMPOperationInvalidException(Op, right);
}
if (left is MatrixValue && right is MatrixValue)
{
var l = (MatrixValue)left;
var r = (MatrixValue)right;
return Dot(l, r);
}
else if (left is MatrixValue && right is ScalarValue)
{
var l = (MatrixValue)left;
var r = (ScalarValue)right;
return Dot(l, r);
}
else if (left is ScalarValue && right is MatrixValue)
{
var l = (ScalarValue)left;
var r = (MatrixValue)right;
return Dot(l, r);
}
return _top.Perform(left, right);
}