zoukankan      html  css  js  c++  java
  • STL: partition

    partition

    Classifies elements in a range into two disjoint sets, with those elements satisfying a unary predicate preceding those that fail to satisfy it.

     
    template<class BidirectionalIterator, class Predicate>
       BidirectionalIterator partition(
          BidirectionalIterator _First, 
          BidirectionalIterator _Last, 
          Predicate _Comp
       );

    stable_partition

    Classifies elements in a range into two disjoint sets, with those elements satisfying a unary predicate preceding those that fail to satisfy it, preserving the relative order of equivalent elements.

     
    template<class BidirectionalIterator, class Predicate> 
       BidirectionalIterator stable_partition( 
          BidirectionalIterator _First,  
          BidirectionalIterator _Last, 
          Predicate _Pred 
       );
     partition_copy

    Copies elements for which a condition is true to one destination, and for which the condition is false to another. The elements must come from a specified range.

    template<class InputIterator, class OutputIterator1, class OutputIterator2, class Predicate>
        pair<OutputIterator1, OutputIterator2>
            partition_copy(
                InputIterator _First, 
                InputIterator _Last,
                OutputIterator1 _Dest1, 
                OutputIterator2 _Dest2, 
                Predicate _Pred
            );
  • 相关阅读:
    Python 向列表中添加元素
    [python] 查找列表中重复的元素
    Excel文件的读写
    Oracle EBS AP 取消付款
    Oracle EBS AP取消核销
    Oracle EBS AP 创建贷项通知单并核销到相应发票
    Oracle EBS AR 其他API
    Oracle EBS AR 冲销收款
    Oracle EBS 银行账户API
    Oracle EBS AR 客户API
  • 原文地址:https://www.cnblogs.com/freewater/p/2953520.html
Copyright © 2011-2022 走看看