Documentation of 'org.jquantlib.math.matrixutilities.internal.MappedAddress' Java class
MappedAddress
org.jquantlib.math.matrixutilities.internal

Class MappedAddress

  • All Implemented Interfaces:
    Address
    Direct Known Subclasses:
    MappedMatrixAddress


    public abstract class MappedAddress
    extends java.lang.Object
    implements Address
    This is the base class for all accessors on top of non-contiguous intervals
    • Constructor Detail

      • MappedAddress

        public MappedAddress(double[] data,
                             int row0,
                             int row1,
                             Address chain,
                             int[] cidx,
                             java.util.Set<Address.Flags> flags,
                             boolean contiguous,
                             int rows,
                             int cols)
      • MappedAddress

        public MappedAddress(double[] data,
                             int[] ridx,
                             Address chain,
                             int col0,
                             int col1,
                             java.util.Set<Address.Flags> flags,
                             boolean contiguous,
                             int rows,
                             int cols)
      • MappedAddress

        public MappedAddress(double[] data,
                             int[] ridx,
                             Address chain,
                             int[] cidx,
                             java.util.Set<Address.Flags> flags,
                             boolean contiguous,
                             int rows,
                             int cols)
    • Method Detail

      • clone

        public MappedAddress clone()
        Overrides:
        clone in class java.lang.Object
      • isContiguous

        public boolean isContiguous()
        Description copied from interface: Address
        Tells if the underlying memory storage can be accessed in a continuous way.

        When contiguous is true, certain operations are benefited by bulk operations.

        Specified by:
        isContiguous in interface Address
      • isFortran

        public boolean isFortran()
        Description copied from interface: Address
        This is a convenience method intended to return Address.Flags.FORTRAN
        Specified by:
        isFortran in interface Address
        Returns:
        Flags#FORTRAN
      • rows

        public int rows()
        Specified by:
        rows in interface Address
        Returns:
        the number of rows mapped
      • cols

        public int cols()
        Specified by:
        cols in interface Address
        Returns:
        the number of columns mapped
      • row0

        public int row0()
        Description copied from interface: Address
        row0 is the row offset of the upmost row of a Matrix.

        Example: Matrix B, being a sub-matrix of A, has row0 like shown below:

             Matrix A = new Matrix(5, 8);
             int row0 = 1; int row1 = 4;
             int col0 = 5; int col1 = 8;
             Matrix B = A.range(row0, row1, col0, col1);
         
        Specified by:
        row0 in interface Address
        Returns:
      • col0

        public int col0()
        Description copied from interface: Address
        col0 is the row offset of the leftmost column of a Matrix.

        Example: Matrix B, being a sub-matrix of A, has col0 like shown below:

             Matrix A = new Matrix(5, 8);
             int row0 = 1; int row1 = 4;
             int col0 = 5; int col1 = 8;
             Matrix B = A.range(row0, row1, col0, col1);
         
        Specified by:
        col0 in interface Address
        Returns:
      • base

        public int base()
        Specified by:
        base in interface Address
        Returns:
        the base address (inclusive)
      • last

        public int last()
        Specified by:
        last in interface Address
        Returns:
        the last address (exclusive)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.