Class ODMatrix

    • Field Detail

      • matrixContents

        protected org.ojalgo.array.Array2D<Double> matrixContents
        matrix of data values
    • Constructor Detail

      • ODMatrix

        public ODMatrix​(Zoning.Zones zones)
        Constructor for matrix based OD demand matrix
        Parameters:
        zones - holder for zones considered in the matrix
    • Method Detail

      • setValue

        public void setValue​(Zone origin,
                             Zone destination,
                             Double 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 Double 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
      • iterator

        public ODMatrixIterator iterator()
        Returns an iterator which can iterate through all the origin-destination cells in the matrix
        Returns:
        iterator through all the origin-destination cells