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
9926bc92
Commit
9926bc92
authored
May 03, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing requirement to the dot() function for matrices.
parent
8dec52ca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
matrix_utilities.h
dlib/matrix/matrix_utilities.h
+3
-2
matrix_utilities_abstract.h
dlib/matrix/matrix_utilities_abstract.h
+1
-0
No files found.
dlib/matrix/matrix_utilities.h
View file @
9926bc92
...
@@ -577,9 +577,10 @@ namespace dlib
...
@@ -577,9 +577,10 @@ namespace dlib
COMPILE_TIME_ASSERT
(
EXP1
::
NR
*
EXP1
::
NC
==
0
||
COMPILE_TIME_ASSERT
(
EXP1
::
NR
*
EXP1
::
NC
==
0
||
EXP2
::
NR
*
EXP2
::
NC
==
0
);
EXP2
::
NR
*
EXP2
::
NC
==
0
);
DLIB_ASSERT
(
is_vector
(
m1
)
&&
is_vector
(
m2
)
&&
m1
.
size
()
==
m2
.
size
(),
DLIB_ASSERT
(
is_vector
(
m1
)
&&
is_vector
(
m2
)
&&
m1
.
size
()
==
m2
.
size
()
&&
m1
.
size
()
>
0
,
"
\t
type dot(const matrix_exp& m1, const matrix_exp& m2)"
"
\t
type dot(const matrix_exp& m1, const matrix_exp& m2)"
<<
"
\n\t
You can only compute the dot product between
vectors of equal length
"
<<
"
\n\t
You can only compute the dot product between
non-empty vectors of equal length.
"
<<
"
\n\t
is_vector(m1): "
<<
is_vector
(
m1
)
<<
"
\n\t
is_vector(m1): "
<<
is_vector
(
m1
)
<<
"
\n\t
is_vector(m2): "
<<
is_vector
(
m2
)
<<
"
\n\t
is_vector(m2): "
<<
is_vector
(
m2
)
<<
"
\n\t
m1.size(): "
<<
m1
.
size
()
<<
"
\n\t
m1.size(): "
<<
m1
.
size
()
...
...
dlib/matrix/matrix_utilities_abstract.h
View file @
9926bc92
...
@@ -93,6 +93,7 @@ namespace dlib
...
@@ -93,6 +93,7 @@ namespace dlib
- is_vector(m1) == true
- is_vector(m1) == true
- is_vector(m2) == true
- is_vector(m2) == true
- m1.size() == m2.size()
- m1.size() == m2.size()
- m1.size() > 0
ensures
ensures
- returns the dot product between m1 and m2. That is, this function
- returns the dot product between m1 and m2. That is, this function
computes and returns the sum, for all i, of m1(i)*m2(i).
computes and returns the sum, for all i, of m1(i)*m2(i).
...
...
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