Class TensorIsCloseTo<S>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeDiagnosingMatcher<Tensor<S>>
-
- org.tensorics.core.testing.hamcrest.TensorIsCloseTo<S>
-
- Type Parameters:
S
- the s
- All Implemented Interfaces:
org.hamcrest.Matcher<Tensor<S>>
,org.hamcrest.SelfDescribing
public class TensorIsCloseTo<S> extends org.hamcrest.TypeSafeDiagnosingMatcher<Tensor<S>>
A hamcrest matcher for base tests, that matches a values of a tensor to be within a certain tolerance compared to the values of a reference (expected) tensor. Further, the shapes of the two tensors have to be equal (conform with theShape.equals(Object)
method).
-
-
Constructor Summary
Constructors Constructor Description TensorIsCloseTo(TensorSupport<S> tensoricSupport, Tensor<S> value, S tolerance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeTo(org.hamcrest.Description description)
protected boolean
matchesSafely(Tensor<S> valueToAssert, org.hamcrest.Description mismatchDescription)
-
-
-
Constructor Detail
-
TensorIsCloseTo
public TensorIsCloseTo(TensorSupport<S> tensoricSupport, Tensor<S> value, S tolerance)
-
-