ADS
Algorithms and Data Structures
Toggle main menu visibility
Loading...
Searching...
No Matches
Subsequences.h
Go to the documentation of this file.
1
/*--------------------------------------------------------------------------*/
2
/*-------------------------- File Subsequences.h ---------------------------*/
3
/*--------------------------------------------------------------------------*/
40
/*--------------------------------------------------------------------------*/
41
/*----------------------------- DEFINITIONS --------------------------------*/
42
/*--------------------------------------------------------------------------*/
43
44
#ifndef __ADS_Subsequences
45
#define __ADS_Subsequences
46
/* self-identification: #endif constant */
47
48
/*--------------------------------------------------------------------------*/
49
/*------------------------------ INCLUDES ----------------------------------*/
50
/*--------------------------------------------------------------------------*/
51
52
#include "
ADS/Contract.h
"
53
54
#include <algorithm>
55
#include <cstddef>
56
#include <vector>
57
58
/*--------------------------------------------------------------------------*/
59
/*--------------------------- NAMESPACE ------------------------------------*/
60
/*--------------------------------------------------------------------------*/
61
62
namespace
ADS
63
{
64
88
template
<
class
T >
89
std::vector< T >
lis
(
const
std::vector< T > & A );
90
109
template
<
class
T >
110
std::size_t
lisLength
(
const
std::vector< T > & A );
111
128
template
<
class
T >
129
T
maxSubarraySum
(
const
std::vector< T > & A );
130
131
/*--------------------------------------------------------------------------*/
132
133
}
// end( namespace ADS )
134
135
/*--------------------------------------------------------------------------*/
136
/*-------------------------- IMPLEMENTATION --------------------------------*/
137
/*--------------------------------------------------------------------------*/
138
139
#include "ADS/algorithm/impl/Subsequences.tpp"
140
141
/*--------------------------------------------------------------------------*/
142
143
#endif
/* Subsequences.h included */
144
145
/*--------------------------------------------------------------------------*/
146
/*------------------------ End File Subsequences.h -------------------------*/
147
/*--------------------------------------------------------------------------*/
Contract.h
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
ADS::lisLength
std::size_t lisLength(const std::vector< T > &A)
the length of a longest increasing subsequence,
ADS::lis
std::vector< T > lis(const std::vector< T > &A)
a longest increasing subsequence,
ADS::maxSubarraySum
T maxSubarraySum(const std::vector< T > &A)
the largest sum of a subvector, the empty one included,
ADS
Definition
ADT.h:96
ADS
algorithm
Subsequences.h
Generated by
1.17.0