public struct Sampling<Base: Collection, Selection: Collection>
where Selection.Element == Base.Index
extension Sampling: SamplingProtocol
extension Sampling: Collection
extension Sampling: BidirectionalCollection
where Selection: BidirectionalCollection
extension Sampling: RandomAccessCollection
where Selection: RandomAccessCollection
कुछ आधार संग्रह से, दिए गए क्रम में तत्वों का एक आलसी चयन।
base
औरselection
से एक उदाहरण बनाता है।घोषणा
public init(base: Base, selection: Selection)
घोषणा
public typealias Element = Base.Element
एक प्रकार जिसके उदाहरण
self
में स्थितियों का प्रतिनिधित्व करते हैं।घोषणा
public typealias Index = Selection.Index
प्रथम तत्व की स्थिति.
घोषणा
public var startIndex: Index { get }
अंतिम तत्व से एक आगे की स्थिति.
घोषणा
public var endIndex: Index { get }