Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
dd8bf755
Commit
dd8bf755
authored
Jun 12, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted asserts to allow mat() to output empty matrices.
parent
44327908
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
matrix_mat.h
dlib/matrix/matrix_mat.h
+4
-4
matrix_mat_abstract.h
dlib/matrix/matrix_mat_abstract.h
+5
-5
No files found.
dlib/matrix/matrix_mat.h
View file @
dd8bf755
...
...
@@ -301,9 +301,9 @@ namespace dlib
long
nr
)
{
DLIB_ASSERT
(
nr
>
0
,
DLIB_ASSERT
(
nr
>
=
0
,
"
\t
const matrix_exp mat(ptr, nr)"
<<
"
\n\t
nr must be
bigger than
0"
<<
"
\n\t
nr must be
>=
0"
<<
"
\n\t
nr: "
<<
nr
);
typedef
op_pointer_to_col_vect
<
T
>
op
;
...
...
@@ -409,9 +409,9 @@ namespace dlib
long
nc
)
{
DLIB_ASSERT
(
nr
>
0
&&
nc
>
0
,
DLIB_ASSERT
(
nr
>
=
0
&&
nc
>=
0
,
"
\t
const matrix_exp mat(ptr, nr, nc)"
<<
"
\n\t
nr and nc must be
bigger than
0"
<<
"
\n\t
nr and nc must be
>=
0"
<<
"
\n\t
nr: "
<<
nr
<<
"
\n\t
nc: "
<<
nc
);
...
...
dlib/matrix/matrix_mat_abstract.h
View file @
dd8bf755
...
...
@@ -114,8 +114,8 @@ namespace dlib
);
/*!
requires
- nr > 0
- ptr == a pointer to at least nr T objects
- nr >
=
0
- ptr == a pointer to at least nr T objects
(or the NULL pointer if nr==0)
ensures
- returns a matrix M such that:
- M.nr() == nr
...
...
@@ -138,9 +138,9 @@ namespace dlib
);
/*!
requires
- nr > 0
- nc > 0
- ptr == a pointer to at least nr*nc T objects
- nr >
=
0
- nc >
=
0
- ptr == a pointer to at least nr*nc T objects
(or the NULL pointer if nr*nc==0)
ensures
- returns a matrix M such that:
- M.nr() == nr
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment