Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions | Variables
25.heap.cpp File Reference
#include <algorithm>
#include <cstring>
#include <rw_alg_test.h>
#include <rw_value.h>
#include <rw_driver.h>
Include dependency graph for 25.heap.cpp:

Go to the source code of this file.

Data Structures

struct  Less< T >
 

Macros

#define HEAP_OP(opname)    if (ppred) opname (first, last, pred); else opname (first, last)
 
#define TEST(src)    test_heap_operation (__LINE__, src, (T*)0, ppred, 0)
 
#define TEST(src)    test_heap_operation (__LINE__, src, (T*)0, ppred, 1)
 
#define TEST(src)    test_heap_operation (__LINE__, src, (T*)0, ppred, 2)
 
#define TEST(src)    test_heap_operation (__LINE__, src, (T*)0, ppred, 3)
 

Functions

 _RWSTD_NAMESPACE (std)
 
template<class T >
bool is_heap (const T *seq, const std::size_t len)
 
template<class T , class Predicate >
void test_heap_operation (int line, const char *src, const T *, const Predicate *ppred, const std::size_t finx)
 
template<class T , class Predicate >
void test_make_heap (const T *, const Predicate *ppred)
 
template<class T , class Predicate >
void test_push_heap (const T *, const Predicate *ppred)
 
template<class T , class Predicate >
void test_pop_heap (const T *, const Predicate *ppred)
 
template<class T , class Predicate >
void test_sort_heap (const T *, const Predicate *ppred)
 
template<class T , class Predicate >
void test_heap_operations (const T *, const Predicate *ppred)
 
int main (int argc, char *argv[])
 

Variables

int rw_opt_no_make_heap
 
int rw_opt_no_push_heap
 
int rw_opt_no_pop_heap
 
int rw_opt_no_sort_heap
 
int rw_opt_no_predicate
 

Macro Definition Documentation

◆ HEAP_OP

#define HEAP_OP (   opname)     if (ppred) opname (first, last, pred); else opname (first, last)

◆ TEST [1/4]

#define TEST (   src)     test_heap_operation (__LINE__, src, (T*)0, ppred, 0)

◆ TEST [2/4]

#define TEST (   src)     test_heap_operation (__LINE__, src, (T*)0, ppred, 1)

◆ TEST [3/4]

#define TEST (   src)     test_heap_operation (__LINE__, src, (T*)0, ppred, 2)

◆ TEST [4/4]

#define TEST (   src)     test_heap_operation (__LINE__, src, (T*)0, ppred, 3)

Function Documentation

◆ _RWSTD_NAMESPACE()

_RWSTD_NAMESPACE ( std  )

25.heap.cpp - test exercising 25.3.6 [lib.alg.heap.operations]

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 1994-2006 Rogue Wave Software.

Definition at line 43 of file 25.heap.cpp.

◆ is_heap()

template<class T >
bool is_heap ( const T *  seq,
const std::size_t  len 
)

Definition at line 131 of file 25.heap.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 466 of file 25.heap.cpp.

◆ test_heap_operation()

template<class T , class Predicate >
void test_heap_operation ( int  line,
const char *  src,
const T *  ,
const Predicate *  ppred,
const std::size_t  finx 
)

Definition at line 150 of file 25.heap.cpp.

◆ test_heap_operations()

template<class T , class Predicate >
void test_heap_operations ( const T *  ,
const Predicate *  ppred 
)

Definition at line 410 of file 25.heap.cpp.

◆ test_make_heap()

template<class T , class Predicate >
void test_make_heap ( const T *  ,
const Predicate *  ppred 
)

Definition at line 246 of file 25.heap.cpp.

◆ test_pop_heap()

template<class T , class Predicate >
void test_pop_heap ( const T *  ,
const Predicate *  ppred 
)

Definition at line 328 of file 25.heap.cpp.

◆ test_push_heap()

template<class T , class Predicate >
void test_push_heap ( const T *  ,
const Predicate *  ppred 
)

Definition at line 286 of file 25.heap.cpp.

◆ test_sort_heap()

template<class T , class Predicate >
void test_sort_heap ( const T *  ,
const Predicate *  ppred 
)

Definition at line 365 of file 25.heap.cpp.

Variable Documentation

◆ rw_opt_no_make_heap

int rw_opt_no_make_heap

Definition at line 401 of file 25.heap.cpp.

◆ rw_opt_no_pop_heap

int rw_opt_no_pop_heap

Definition at line 403 of file 25.heap.cpp.

◆ rw_opt_no_predicate

int rw_opt_no_predicate

Definition at line 405 of file 25.heap.cpp.

◆ rw_opt_no_push_heap

int rw_opt_no_push_heap

Definition at line 402 of file 25.heap.cpp.

◆ rw_opt_no_sort_heap

int rw_opt_no_sort_heap

Definition at line 404 of file 25.heap.cpp.