Interface Blendable<B>

Type Parameters:
B - blendable class
All Known Subinterfaces:
RealMatrix, SparseRealMatrix, Vector<S,V>
All Known Implementing Classes:
AbstractRealMatrix, Array2DRowRealMatrix, BlockRealMatrix, DiagonalMatrix, OpenMapRealMatrix, Vector1D, Vector2D, Vector3D

public interface Blendable<B>
Interface representing classes that can blend with other instances of themselves using a given blending value.

The blending value is commonly given from a smoothstep function.

  • Method Summary

    Modifier and Type
    Method
    Description
    blendArithmeticallyWith(B other, double blendingValue)
    Blend arithmetically this instance with another one.
  • Method Details

    • blendArithmeticallyWith

      B blendArithmeticallyWith(B other, double blendingValue) throws MathIllegalArgumentException
      Blend arithmetically this instance with another one.
      Parameters:
      other - other instance to blend arithmetically with
      blendingValue - value from smoothstep function B(x). It is expected to be between [0:1] and will throw an exception otherwise.
      Returns:
      this * (1 - B(x)) + other * B(x)
      Throws:
      MathIllegalArgumentException - if blending value is not within [0:1]