Class OdPrimitiveMatrix<T extends Number>

    • Constructor Detail

      • OdPrimitiveMatrix

        public OdPrimitiveMatrix​(Class<? extends IdAble> idTokenClass,
                                 IdGroupingToken idToken,
                                 OdZones zones,
                                 org.ojalgo.array.Array2D<T> matrixContents)
        Constructor for Od matrix containing primitives, i.e. number based
        Parameters:
        idTokenClass - to use for id generation
        idToken - to use for the matrix id
        zones - holder for zones considered in the matrix
        matrixContents - container for the matrix contents
      • OdPrimitiveMatrix

        public OdPrimitiveMatrix​(OdPrimitiveMatrix<T> other)
        Copy Constructor
        Parameters:
        other - to copy
    • Method Detail

      • setValue

        public void setValue​(Zone origin,
                             Zone destination,
                             T value)
        Sets the value for a specified origin and destination
        Parameters:
        origin - specified origin
        destination - specified destination
        value - value at the specified cell
      • getValue

        public T getValue​(Zone origin,
                          Zone destination)
        Returns the value for a specified origin and destination
        Parameters:
        origin - specified origin
        destination - specified destination
        Returns:
        value at the specified cell
      • getValue

        public T getValue​(long originId,
                          long destinationId)
        Returns the value for a specified origin and destination by their internal id
        Parameters:
        originId - specified origin
        destinationId - specified destination
        Returns:
        value at the specified cell