Class DropPartitionsPLL<T>


  • public class DropPartitionsPLL<T>
    extends PLL<T>
    A PLL obtained by dropping some partitions from the parent PLL. This PLL may also reorder the partitions of the parent PLL. It is primarily used when sampling from large PLLs where we do not want to sample from every partition (for instance because the desired sample size is smaller than the number of partitions).
    • Field Detail

      • partitions

        protected final io.vavr.collection.Array<Partition> partitions
      • parent

        protected final PLL<T> parent
    • Constructor Detail

      • DropPartitionsPLL

        public DropPartitionsPLL​(PLL<T> parent,
                                 List<Integer> retainedPartitionIds)
        Constructor.
        Parameters:
        parent - the parent PLL to drop partitions of
        retainedPartitionIds - the list of partition indices to retain. The partitions will be ordered according to this list of indices.
    • Method Detail

      • compute

        protected CloseableIterator<T> compute​(Partition partition)
        Description copied from class: PLL
        Iterate over the elements of the given partition. This is the method that should be implemented by subclasses. As this method forces computation, ignoring any caching, consumers should not call it directly but rather use PLL.iterate(Partition). Once the iterator is not needed anymore, it should be closed. This makes it possible to release the underlying resources supporting it, such as open files or sockets.
        Specified by:
        compute in class PLL<T>
        Parameters:
        partition - the partition to iterate over
        Returns:
      • getPartitions

        public io.vavr.collection.Array<? extends Partition> getPartitions()
        Specified by:
        getPartitions in class PLL<T>
        Returns:
        the partitions in this list
      • getParents

        public List<PLL<?>> getParents()
        Description copied from class: PLL
        Returns the PLLs that this PLL depends on, to compute its contents. This is used for debugging purposes, to display the tree of dependencies of a given PLL.
        Specified by:
        getParents in class PLL<T>
        See Also:
        PLL.getQueryTree()