Class AllElementsEqualTo<V>

  • Type Parameters:
    V - the type of the values of the tensor
    All Implemented Interfaces:
    org.hamcrest.Matcher<Tensor<V>>, org.hamcrest.SelfDescribing

    public class AllElementsEqualTo<V>
    extends org.hamcrest.TypeSafeMatcher<Tensor<V>>
    This matcher checks, if all the values of the tensor are equal to one specific value. This value might aswell be null, then then matcher would return true, only if all the elements also would be null.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <V> org.hamcrest.Matcher<Tensor<V>> allElementsEqualTo​(V value)  
      void describeTo​(org.hamcrest.Description description)  
      protected boolean matchesSafely​(Tensor<V> tensor)  
      • Methods inherited from class org.hamcrest.TypeSafeMatcher

        describeMismatch, describeMismatchSafely, matches
      • Methods inherited from class org.hamcrest.BaseMatcher

        _dont_implement_Matcher___instead_extend_BaseMatcher_, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • allElementsEqualTo

        public static final <V> org.hamcrest.Matcher<Tensor<V>> allElementsEqualTo​(V value)
      • describeTo

        public void describeTo​(org.hamcrest.Description description)
      • matchesSafely

        protected boolean matchesSafely​(Tensor<V> tensor)
        Specified by:
        matchesSafely in class org.hamcrest.TypeSafeMatcher<Tensor<V>>