Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Özgür Ozan Sen
ogs
Commits
a7ac4578
Commit
a7ac4578
authored
10 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
[ML] Replace deprecated throw() with noexcept.
parent
1769b044
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MathLib/LinAlg/Dense/DenseMatrix-impl.h
+8
-8
8 additions, 8 deletions
MathLib/LinAlg/Dense/DenseMatrix-impl.h
MathLib/LinAlg/Dense/DenseMatrix.h
+8
-8
8 additions, 8 deletions
MathLib/LinAlg/Dense/DenseMatrix.h
with
16 additions
and
16 deletions
MathLib/LinAlg/Dense/DenseMatrix-impl.h
+
8
−
8
View file @
a7ac4578
...
@@ -56,7 +56,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::~DenseMatrix ()
...
@@ -56,7 +56,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::~DenseMatrix ()
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
=
(
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>
const
&
rhs
)
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
=
(
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>
const
&
rhs
)
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
if
(
this
==
&
rhs
)
if
(
this
==
&
rhs
)
return
*
this
;
return
*
this
;
...
@@ -140,7 +140,7 @@ V DenseMatrix<FP_TYPE, IDX_TYPE>::operator* (V const& x) const
...
@@ -140,7 +140,7 @@ V DenseMatrix<FP_TYPE, IDX_TYPE>::operator* (V const& x) const
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>*
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>*
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
+
(
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
mat
)
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
+
(
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
mat
)
const
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
// make sure the two matrices have the same dimension.
// make sure the two matrices have the same dimension.
if
(
_n_rows
!=
mat
.
getNRows
()
||
_n_cols
!=
mat
.
getNCols
())
if
(
_n_rows
!=
mat
.
getNRows
()
||
_n_cols
!=
mat
.
getNCols
())
...
@@ -159,7 +159,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::operator+(const DenseMatrix<FP_TYPE, IDX_TYPE>&
...
@@ -159,7 +159,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::operator+(const DenseMatrix<FP_TYPE, IDX_TYPE>&
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>*
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>*
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
-
(
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
mat
)
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
-
(
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
mat
)
const
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
// make sure the two matrices have the same dimension.
// make sure the two matrices have the same dimension.
if
(
_n_rows
!=
mat
.
getNRows
()
||
_n_cols
!=
mat
.
getNCols
())
if
(
_n_rows
!=
mat
.
getNRows
()
||
_n_cols
!=
mat
.
getNCols
())
...
@@ -178,7 +178,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::operator-(const DenseMatrix<FP_TYPE, IDX_TYPE>&
...
@@ -178,7 +178,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::operator-(const DenseMatrix<FP_TYPE, IDX_TYPE>&
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>*
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>*
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
*
(
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
mat
)
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
*
(
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
mat
)
const
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
// make sure the two matrices have the same dimension.
// make sure the two matrices have the same dimension.
if
(
_n_cols
!=
mat
.
getNRows
())
if
(
_n_cols
!=
mat
.
getNRows
())
...
@@ -218,7 +218,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>*
...
@@ -218,7 +218,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>*
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
getSubMatrix
(
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
getSubMatrix
(
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
IDX_TYPE
e_row
,
IDX_TYPE
e_col
)
const
IDX_TYPE
e_row
,
IDX_TYPE
e_col
)
const
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
if
(
b_row
>=
e_row
|
b_col
>=
e_col
)
if
(
b_row
>=
e_row
|
b_col
>=
e_col
)
throw
std
::
range_error
(
"DenseMatrix::getSubMatrix() illegal sub matrix"
);
throw
std
::
range_error
(
"DenseMatrix::getSubMatrix() illegal sub matrix"
);
...
@@ -239,7 +239,7 @@ template<typename FP_TYPE, typename IDX_TYPE>
...
@@ -239,7 +239,7 @@ template<typename FP_TYPE, typename IDX_TYPE>
void
void
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
setSubMatrix
(
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
setSubMatrix
(
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
sub_mat
)
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>&
sub_mat
)
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
if
(
b_row
+
sub_mat
.
getNRows
()
>
_n_rows
|
b_col
+
sub_mat
.
getNCols
()
>
_n_cols
)
if
(
b_row
+
sub_mat
.
getNRows
()
>
_n_rows
|
b_col
+
sub_mat
.
getNCols
()
>
_n_cols
)
throw
std
::
range_error
(
"DenseMatrix::setSubMatrix() sub matrix to big"
);
throw
std
::
range_error
(
"DenseMatrix::setSubMatrix() sub matrix to big"
);
...
@@ -254,7 +254,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::setSubMatrix(IDX_TYPE b_row, IDX_TYPE b_col,
...
@@ -254,7 +254,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::setSubMatrix(IDX_TYPE b_row, IDX_TYPE b_col,
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
FP_TYPE
&
FP_TYPE
&
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
if
((
row
>=
_n_rows
)
|
(
col
>=
_n_cols
))
if
((
row
>=
_n_rows
)
|
(
col
>=
_n_cols
))
throw
std
::
range_error
(
"DenseMatrix: op() const range error"
);
throw
std
::
range_error
(
"DenseMatrix: op() const range error"
);
...
@@ -265,7 +265,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::operator() (IDX_TYPE row, IDX_TYPE col)
...
@@ -265,7 +265,7 @@ DenseMatrix<FP_TYPE, IDX_TYPE>::operator() (IDX_TYPE row, IDX_TYPE col)
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
template
<
typename
FP_TYPE
,
typename
IDX_TYPE
>
FP_TYPE
const
&
FP_TYPE
const
&
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
const
DenseMatrix
<
FP_TYPE
,
IDX_TYPE
>::
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
const
throw
(
std
::
range_error
)
noexcept
(
false
)
{
{
if
((
row
>=
_n_rows
)
|
(
col
>=
_n_cols
))
if
((
row
>=
_n_rows
)
|
(
col
>=
_n_cols
))
throw
std
::
range_error
(
"DenseMatrix: op() const range error"
);
throw
std
::
range_error
(
"DenseMatrix: op() const range error"
);
...
...
This diff is collapsed.
Click to expand it.
MathLib/LinAlg/Dense/DenseMatrix.h
+
8
−
8
View file @
a7ac4578
...
@@ -64,7 +64,7 @@ public:
...
@@ -64,7 +64,7 @@ public:
* Assignment operator, makes a copy of the internal data of the object.
* Assignment operator, makes a copy of the internal data of the object.
* @param rhs The DenseMatrix object to the right side of the assignment symbol.
* @param rhs The DenseMatrix object to the right side of the assignment symbol.
*/
*/
DenseMatrix
&
operator
=
(
DenseMatrix
const
&
rhs
)
throw
(
std
::
range_error
);
DenseMatrix
&
operator
=
(
DenseMatrix
const
&
rhs
)
noexcept
(
false
);
/**
/**
* This is the move assignment operator.
* This is the move assignment operator.
...
@@ -88,18 +88,18 @@ public:
...
@@ -88,18 +88,18 @@ public:
/**
/**
* DenseMatrix matrix addition.
* DenseMatrix matrix addition.
*/
*/
DenseMatrix
*
operator
+
(
const
DenseMatrix
&
mat
)
const
throw
(
std
::
range_error
);
DenseMatrix
*
operator
+
(
const
DenseMatrix
&
mat
)
const
noexcept
(
false
);
/**
/**
* DenseMatrix matrix subtraction
* DenseMatrix matrix subtraction
*/
*/
DenseMatrix
*
operator
-
(
const
DenseMatrix
&
mat
)
const
throw
(
std
::
range_error
);
DenseMatrix
*
operator
-
(
const
DenseMatrix
&
mat
)
const
noexcept
(
false
);
/**
/**
* DenseMatrix matrix multiplication \f$ C = A \cdot B\f$
* DenseMatrix matrix multiplication \f$ C = A \cdot B\f$
* @param mat the matrix \f$ B \f$
* @param mat the matrix \f$ B \f$
* @return the matrix \f$ C \f$
* @return the matrix \f$ C \f$
*/
*/
DenseMatrix
*
operator
*
(
const
DenseMatrix
&
mat
)
const
throw
(
std
::
range_error
);
DenseMatrix
*
operator
*
(
const
DenseMatrix
&
mat
)
const
noexcept
(
false
);
/**
/**
* matrix transpose
* matrix transpose
...
@@ -107,7 +107,7 @@ public:
...
@@ -107,7 +107,7 @@ public:
*/
*/
DenseMatrix
*
transpose
()
const
;
// HB & ZC
DenseMatrix
*
transpose
()
const
;
// HB & ZC
DenseMatrix
*
getSubMatrix
(
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
IDX_TYPE
e_row
,
IDX_TYPE
e_col
)
const
throw
(
std
::
range_error
);
DenseMatrix
*
getSubMatrix
(
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
IDX_TYPE
e_row
,
IDX_TYPE
e_col
)
const
noexcept
(
false
);
/**
/**
* overwrites values of the matrix with the given sub matrix
* overwrites values of the matrix with the given sub matrix
...
@@ -115,10 +115,10 @@ public:
...
@@ -115,10 +115,10 @@ public:
* @param b_col the first column
* @param b_col the first column
* @param sub_mat the sub matrix
* @param sub_mat the sub matrix
*/
*/
void
setSubMatrix
(
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
const
DenseMatrix
&
sub_mat
)
throw
(
std
::
range_error
);
void
setSubMatrix
(
IDX_TYPE
b_row
,
IDX_TYPE
b_col
,
const
DenseMatrix
&
sub_mat
)
noexcept
(
false
);
inline
FP_TYPE
&
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
throw
(
std
::
range_error
);
inline
FP_TYPE
&
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
noexcept
(
false
);
inline
FP_TYPE
const
&
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
const
throw
(
std
::
range_error
);
inline
FP_TYPE
const
&
operator
()
(
IDX_TYPE
row
,
IDX_TYPE
col
)
const
noexcept
(
false
);
/**
/**
* writes the matrix entries into the output stream
* writes the matrix entries into the output stream
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment