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
fced3587
Commit
fced3587
authored
5 years ago
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing grammar
parent
48b9bf3f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
matrix_ex.cpp
examples/matrix_ex.cpp
+2
-2
matrix_expressions_ex.cpp
examples/matrix_expressions_ex.cpp
+1
-1
No files found.
examples/matrix_ex.cpp
View file @
fced3587
...
@@ -34,7 +34,7 @@ int main()
...
@@ -34,7 +34,7 @@ int main()
// First let's declare these 3 matrices.
// First let's declare these 3 matrices.
// This declares a matrix that contains doubles and has 3 rows and 1 column.
// This declares a matrix that contains doubles and has 3 rows and 1 column.
// Moreover, it
'
s size is a compile time constant since we put it inside the <>.
// Moreover, its size is a compile time constant since we put it inside the <>.
matrix
<
double
,
3
,
1
>
y
;
matrix
<
double
,
3
,
1
>
y
;
// Make a 3 by 3 matrix of doubles for the M matrix. In this case, M is
// Make a 3 by 3 matrix of doubles for the M matrix. In this case, M is
// sized at runtime and can therefore be resized later by calling M.set_size().
// sized at runtime and can therefore be resized later by calling M.set_size().
...
@@ -170,7 +170,7 @@ int main()
...
@@ -170,7 +170,7 @@ int main()
// MATLAB: E = A * B
// MATLAB: E = A * B
E
=
A
*
B
;
E
=
A
*
B
;
// MATLAB: E = A +
B
// MATLAB: E = A +
C
E
=
A
+
C
;
E
=
A
+
C
;
// MATLAB: E = A + 5
// MATLAB: E = A + 5
...
...
This diff is collapsed.
Click to expand it.
examples/matrix_expressions_ex.cpp
View file @
fced3587
...
@@ -247,7 +247,7 @@ struct example_op_vector_to_matrix
...
@@ -247,7 +247,7 @@ struct example_op_vector_to_matrix
/*!
/*!
This object defines a matrix expression that holds a reference to a std::vector<T>
This object defines a matrix expression that holds a reference to a std::vector<T>
and makes it look like a column vector. Thus it enables you to use a std::vector
and makes it look like a column vector. Thus it enables you to use a std::vector
as if it w
as
a dlib::matrix.
as if it w
ere
a dlib::matrix.
!*/
!*/
example_op_vector_to_matrix
(
const
std
::
vector
<
T
>&
vect_
)
:
vect
(
vect_
){}
example_op_vector_to_matrix
(
const
std
::
vector
<
T
>&
vect_
)
:
vect
(
vect_
){}
...
...
This diff is collapsed.
Click to expand it.
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