ADS
Algorithms and Data Structures
Toggle main menu visibility
Loading...
Searching...
No Matches
MatrixChain.h
Go to the documentation of this file.
1
/*--------------------------------------------------------------------------*/
2
/*--------------------------- File MatrixChain.h ---------------------------*/
3
/*--------------------------------------------------------------------------*/
37
/*--------------------------------------------------------------------------*/
38
/*----------------------------- DEFINITIONS --------------------------------*/
39
/*--------------------------------------------------------------------------*/
40
41
#ifndef __ADS_MatrixChain
42
#define __ADS_MatrixChain
43
/* self-identification: #endif constant */
44
45
/*--------------------------------------------------------------------------*/
46
/*------------------------------ INCLUDES ----------------------------------*/
47
/*--------------------------------------------------------------------------*/
48
49
#include "
ADS/Contract.h
"
50
51
#include <algorithm>
52
#include <cstddef>
53
#include <limits>
54
#include <string>
55
#include <utility>
56
#include <vector>
57
58
/*--------------------------------------------------------------------------*/
59
/*--------------------------- NAMESPACE ------------------------------------*/
60
/*--------------------------------------------------------------------------*/
61
62
namespace
ADS
63
{
64
88
inline
std::pair< long , std::vector< std::vector< std::size_t > > >
89
matrixChain
(
const
std::vector< long > & c );
90
105
inline
std::string
106
parenthesization
(
const
std::vector< std::vector< std::size_t > > & S ,
107
std::size_t i , std::size_t j );
108
109
/*--------------------------------------------------------------------------*/
110
111
}
// end( namespace ADS )
112
113
/*--------------------------------------------------------------------------*/
114
/*-------------------------- IMPLEMENTATION --------------------------------*/
115
/*--------------------------------------------------------------------------*/
116
117
#include "ADS/numeric/impl/MatrixChain.tpp"
118
119
/*--------------------------------------------------------------------------*/
120
121
#endif
/* MatrixChain.h included */
122
123
/*--------------------------------------------------------------------------*/
124
/*------------------------- End File MatrixChain.h -------------------------*/
125
/*--------------------------------------------------------------------------*/
Contract.h
The contracts of ADS: the preconditions, the postconditions and the invariants of the operations,...
ADS::matrixChain
std::pair< long, std::vector< std::vector< std::size_t > > > matrixChain(const std::vector< long > &c)
the least cost and the table of the splits, for the matrices of sizes (the parentesizzazione() of...
ADS::parenthesization
std::string parenthesization(const std::vector< std::vector< std::size_t > > &S, std::size_t i, std::size_t j)
the parenthesization of by the splits , e.g., ((A0·A1)·A2) (the stampaPar() of the book)
ADS
Definition
ADT.h:96
ADS
numeric
MatrixChain.h
Generated by
1.17.0