/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Copyright (c) 1997
* Moscow Center for SPARC Technology
*
* Copyright (c) 1999
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
#ifndef _STLP_ALGO_C
# define _STLP_ALGO_C
_STLP_BEGIN_NAMESPACE
template <class _BidirectionalIter, class _Distance, class _Compare>
void __merge_without_buffer(_BidirectionalIter __first,
_BidirectionalIter __middle,
_BidirectionalIter __last,
_Distance __len1, _Distance __len2,
_Compare __comp);
template <class _BidirectionalIter1, class _BidirectionalIter2,
class _BidirectionalIter3, class _Compare>
_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
_BidirectionalIter1 __last1,
_BidirectionalIter2 __first2,
_BidirectionalIter2 __last2,
_BidirectionalIter3 __result,
_Compare __comp);
template <class _Tp>
# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
inline
# endif
const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) {
if (__a < __b)
if (__b < __c)
return __b;
else if (__a < __c)
return __c;
else
return __a;
else if (__a < __c)
return __a;
else if (__b < __c)
return __c;
else
return __b;
}
template <class _Tp, class _Compare>
# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
inline
# endif
const _Tp&
__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) {
if (__comp(__a, __b))
if (__comp(__b, __c))
return __b;
else if (__comp(__a, __c))
return __c;
else
return __a;
else if (__comp(__a, __c))
return __a;
else if (__comp(__b, __c))
return __c;
else
return __b;
}
template <class _ForwardIter1, class _ForwardIter2>
_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2)
{
_STLP_DEBUG_CHECK(__check_range(__first1, __last1))
_STLP_DEBUG_CHECK(__check_range(__first2, __last2))
// Test for empty ranges
if (__first1 == __last1 || __first2 == __last2)
return __first1;
// Test for a pattern of length 1.
_ForwardIter2 __tmp(__first2);
++__tmp;
if (__tmp == __last2)
return find(__first1, __last1, *__first2);
// General case.
_ForwardIter2 __p1, __p;
__p1 = __first2; ++__p1;
_ForwardIter1 __current = __first1;
while (__first1 != __last1) {
__first1 = find(__first1, __last1, *__first2);
if (__first1 == __last1)
return __last1;
__p = __p1;
__current = __first1;
if (++__current == __last1)
return __last1;
while (*__current == *__p) {
if (++__p == __last2)
return __first1;
if (++__current == __last1)
return __last1;
}
++__first1;
}
return __first1;
}
// search_n. Search for __count consecutive copies of __val.
template <class _ForwardIter, class _Integer, class _Tp>
_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
_Integer __count, const _Tp& __val) {
_STLP_DEBUG_CHECK(__check_range(__first, __last))
if (__count <= 0)
return __first;
else {
__first = find(__first, __last, __val);
while (__first != __last) {
_Integer __n = __count - 1;
_ForwardIter __i = __first;
++__i;
while (__i != __last && __n != 0 && *__i == __val) {
++__i;
--__n;
}
if (__n == 0)
return __first;
else
__first = find(__i, __last, __val);
}
return __last;
}
}
template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
_Integer __count, const _Tp& __val,
_BinaryPred __binary_pred) {
_STLP_DEBUG_CHECK(__check_range(__first, __last))
if (__count <= 0)
return __first;
else {
while (__first != __last) {
if (__binary_pred(*__first, __val))
break;
++__first;
}
while (__first != __last) {
_Integer __n = __count - 1;
_ForwardIter __i = __first;
++__i;
while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) {
++__i;
--__n;
}
if (__n == 0)
return __first;
else {
while (__i != __last) {
if (__binary_pred(*__i, __val))
break;
++__i;
}
__first = __i;
}
}
return __last;
}
}
template <class _ForwardIter1, class _ForwardIter2>
_ForwardIter1
find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
_ForwardIter2 __first2, _ForwardIter2 __last2)
{
_STLP_DEBUG_CHECK(__check_range(__first1, __last1))
_STLP_DEBUG_CHECK(__check_range(__first2, __last2))
return __find_end(__first1, __last1, __first2, __last2,
# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
_STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
_STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
# else
forward_iterator_tag(),
forward_iterator_tag(),
# endif
__equal_to(_STLP_VALUE_TYPE(__first1, _ForwardIter1))
);
}
// unique and unique_copy
template <class _InputIterator, class _OutputIterator, class _BinaryPredicate,
class _Tp>
_STLP_INLINE_LOOP _OutputIterator
__unique_copy(_InputIterator __first, _InputIterator __last,
_OutputIterator __result,
_BinaryPredicate __binary_pred, _Tp*) {
_Tp __value = *__first;
*__result = __value;
while (++__first != __last)
if (!__binary_pred(__value, *__first)) {
__value = *__first;
*++__result = __value;
}
return ++__result;
}
template <class _InputIter, class _OutputIter, class _BinaryPredicate>
inline _OutputIter
__unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
_BinaryPredicate __binary_pred, const output_iterator_tag &) {
return __unique_copy(__first, __last, __result, __binary_pred, _STLP_VALUE_TYPE(__first, _InputIter));
}
template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
_STLP_INLINE_LOOP _ForwardIter
__unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result,
_BinaryPredicate __binary_pred, const forward_iterator_tag &) {
*__result = *__first;
while (++__first != __last)
if (!__binary_pred(*__result, *__first)) *++__result = *__first;
return ++__result;
}
# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
template <class _InputIterator, class _BidirectionalIterator, class _BinaryPredicate>
inline _BidirectionalIterator
__unique_copy(_InputIterator __first, _InputIterator __last,
_BidirectionalIterator __result, _BinaryPredicate __binary_pred,
const bidirectional_iterator_tag &) {
return __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag());
}
template <class _InputIterator, class _RandomAccessIterator,
没有合适的资源?快使用搜索试试~ 我知道了~
c++builder 6.0 lite1.07
共2000个文件
h:1603个
lib:214个
hpp:78个
5星 · 超过95%的资源 需积分: 10 201 下载量 74 浏览量
2015-04-11
19:38:39
上传
评论 2
收藏 31.76MB RAR 举报
温馨提示
BCB 6.0 lite 1.07,很老了,但是很好用,win8.1也支持,做小程序,测试专用。网吧用。
资源推荐
资源详情
资源评论
收起资源包目录
c++builder 6.0 lite1.07 (2000个子文件)
ALGORITHM 1KB
BCB6.ALS 1.12MB
Makefile.am 131B
BITSET 2KB
DEFAULT.BMK 6KB
DEFLIB.BMK 6KB
RTL.BPI 1.79MB
VCL.BPI 412KB
VCL.BPI 412KB
RTL.BPI 355KB
DESIGNIDE.BPI 240KB
DBRTL.BPI 76KB
DBRTL.BPI 76KB
VCLDB.BPI 64KB
VCLDB.BPI 64KB
VCLX.BPI 43KB
VCLX.BPI 43KB
DCLSTD.BPI 41KB
BCBSMP.BPI 17KB
BCBIE.BPI 11KB
VCLJPG.BPI 4KB
VCLJPG.BPI 4KB
coreide60.bpl 3.01MB
vcl60.bpl 1.26MB
bcbide60.bpl 953KB
proide60.bpl 809KB
designide60.bpl 690KB
vclide60.bpl 681KB
rtl60.bpl 661KB
RTL60.BPL 661KB
BCBCXP60.BPL 610KB
tlib60.bpl 468KB
DESIGNDGM60.BPL 436KB
DCLSTD60.BPL 296KB
VCLDB60.BPL 257KB
DBRTL60.BPL 249KB
VCLIE60.BPL 220KB
vclx60.bpl 209KB
BCBIE60.BPL 132KB
direct60.bpl 101KB
vcljpg60.bpl 94KB
DCL31W60.BPL 43KB
vclhie60.bpl 23KB
_ALGO.C 61KB
_ROPE.C 50KB
_ISTREAM.C 44KB
_FSTREAM.C 26KB
_TREE.C 25KB
DANIM_I.C 24KB
_DEQUE.C 24KB
_STRING.C 21KB
_NUM_GET.C 20KB
_NUM_PUT.C 18KB
_SSTREAM.C 17KB
_MONETARY.C 17KB
_DEBUG.C 16KB
_HASHTABLE.C 15KB
_TIME_FACETS.C 15KB
_BITSET.C 15KB
_ALLOC.C 12KB
_ALGOBASE.C 12KB
_OSTREAM.C 11KB
CDOSYS_I.C 9KB
_LIMITS.C 9KB
_STRING_IO.C 9KB
_PTHREAD_ALLOC.C 8KB
_HEAP.C 8KB
_LIST.C 6KB
_STREAMBUF.C 6KB
DXTGUID.C 6KB
_SLIST.C 5KB
_VALARRAY.C 5KB
_COMPLEX.C 5KB
_THREADS.C 4KB
_VECTOR.C 4KB
AGTSVR_I.C 4KB
AGTCTL_I.C 4KB
_IOS.C 4KB
_SLIST_BASE.C 3KB
_NUMERIC.C 3KB
CDO_I.C 3KB
MTXADMIN_I.C 2KB
MTSADMIN_I.C 2KB
ESCONF_I.C 2KB
_TEMPBUF.C 1KB
_STRING_FWD.C 1KB
EXCHHNDL_I.C 1001B
CASSERT 1KB
ALGORITH.CC 79KB
VALARRAY.CC 78KB
LIMITS.CC 45KB
ISTREAM.CC 44KB
OSTREAM.CC 37KB
FSTREAM.CC 36KB
STRING.CC 35KB
MONEY.CC 22KB
TIME.CC 21KB
SSTREAM.CC 20KB
TREE.CC 20KB
NUMBRW.CC 20KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
sdragonx
- 粉丝: 17
- 资源: 16
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页