Commit 9ebbecb9 authored by Davis King's avatar Davis King

Just fixing grammar in comments.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403459
parent e021bb86
...@@ -515,7 +515,7 @@ namespace dlib ...@@ -515,7 +515,7 @@ namespace dlib
/*!A is_built_in_scalar_type /*!A is_built_in_scalar_type
This is a template that allows you to determine if the given type is a built This is a template that allows you to determine if the given type is a built
in scalar type such as an int, char, float, short, etc... in scalar type such as an int, char, float, short, etc.
For example, is_built_in_scalar_type<char>::value == true For example, is_built_in_scalar_type<char>::value == true
For example, is_built_in_scalar_type<std::string>::value == false For example, is_built_in_scalar_type<std::string>::value == false
......
...@@ -354,7 +354,7 @@ namespace dlib ...@@ -354,7 +354,7 @@ namespace dlib
- rhs != 0 - rhs != 0
- result->size >= lhs->digits_used - result->size >= lhs->digits_used
- remainder->size >= lhs->digits_used - remainder->size >= lhs->digits_used
- each parameter is unique (i.e. lhs != result, lhs != remainder, etc...) - each parameter is unique (i.e. lhs != result, lhs != remainder, etc.)
ensures ensures
- result == lhs / rhs - result == lhs / rhs
- remainder == lhs % rhs - remainder == lhs % rhs
......
...@@ -380,7 +380,7 @@ namespace dlib ...@@ -380,7 +380,7 @@ namespace dlib
- rhs != 0 - rhs != 0
- result->size >= lhs->digits_used - result->size >= lhs->digits_used
- remainder->size >= lhs->digits_used - remainder->size >= lhs->digits_used
- each parameter is unique (i.e. lhs != result, lhs != remainder, etc...) - each parameter is unique (i.e. lhs != result, lhs != remainder, etc.)
ensures ensures
- result == lhs / rhs - result == lhs / rhs
- remainder == lhs % rhs - remainder == lhs % rhs
......
...@@ -179,7 +179,7 @@ namespace dlib ...@@ -179,7 +179,7 @@ namespace dlib
- argv == an array of strings that was obtained from the second argument - argv == an array of strings that was obtained from the second argument
of the function main(). of the function main().
(i.e. argv[0] should be the <program> token, argv[1] should be (i.e. argv[0] should be the <program> token, argv[1] should be
an <options> or <arg> token, etc...) an <options> or <arg> token, etc.)
- argc == the number of strings in argv - argc == the number of strings in argv
ensures ensures
- parses the command line given by argc and argv - parses the command line given by argc and argv
......
...@@ -35,7 +35,7 @@ namespace dlib ...@@ -35,7 +35,7 @@ namespace dlib
ensures ensures
- #roots == a queue containing directories that represent all the roots - #roots == a queue containing directories that represent all the roots
of the filesystem on this machine. (e.g. in windows you have c:\, d:\ of the filesystem on this machine. (e.g. in windows you have c:\, d:\
etc...) etc.)
throws throws
- std::bad_alloc - std::bad_alloc
!*/ !*/
......
...@@ -95,7 +95,7 @@ namespace dlib ...@@ -95,7 +95,7 @@ namespace dlib
- The "child context set" of a node is a set of nodes with - The "child context set" of a node is a set of nodes with
contexts that are one symbol longer and prefixed by the node's contexts that are one symbol longer and prefixed by the node's
context. For example, if a node has a context "abc" then the context. For example, if a node has a context "abc" then the
nodes for contexts "abca", "abcb", "abcc", etc... are all in nodes for contexts "abca", "abcb", "abcc", etc. are all in
the child context set of the node. the child context set of the node.
- The "parent context" of a node is the context that is one - The "parent context" of a node is the context that is one
symbol shorter than the node's context and includes the symbol shorter than the node's context and includes the
......
...@@ -101,7 +101,7 @@ namespace dlib ...@@ -101,7 +101,7 @@ namespace dlib
- The "child context set" of a node is a set of nodes with - The "child context set" of a node is a set of nodes with
contexts that are one symbol longer and prefixed by the node's contexts that are one symbol longer and prefixed by the node's
context. For example, if a node has a context "abc" then the context. For example, if a node has a context "abc" then the
nodes for contexts "abca", "abcb", "abcc", etc... are all in nodes for contexts "abca", "abcb", "abcc", etc. are all in
the child context set of the node. the child context set of the node.
- The "parent context" of a node is the context that is one - The "parent context" of a node is the context that is one
symbol shorter than the node's context and includes the symbol shorter than the node's context and includes the
......
...@@ -92,7 +92,7 @@ namespace dlib ...@@ -92,7 +92,7 @@ namespace dlib
- The "child context set" of a node is a set of nodes with - The "child context set" of a node is a set of nodes with
contexts that are one symbol longer and prefixed by the node's contexts that are one symbol longer and prefixed by the node's
context. For example, if a node has a context "abc" then the context. For example, if a node has a context "abc" then the
nodes for contexts "abca", "abcb", "abcc", etc... are all in nodes for contexts "abca", "abcb", "abcc", etc. are all in
the child context set of the node. the child context set of the node.
- The "parent context" of a node is the context that is one - The "parent context" of a node is the context that is one
symbol shorter than the node's context and includes the symbol shorter than the node's context and includes the
......
...@@ -101,7 +101,7 @@ namespace dlib ...@@ -101,7 +101,7 @@ namespace dlib
- The "child context set" of a node is a set of nodes with - The "child context set" of a node is a set of nodes with
contexts that are one symbol longer and prefixed by the node's contexts that are one symbol longer and prefixed by the node's
context. For example, if a node has a context "abc" then the context. For example, if a node has a context "abc" then the
nodes for contexts "abca", "abcb", "abcc", etc... are all in nodes for contexts "abca", "abcb", "abcc", etc. are all in
the child context set of the node. the child context set of the node.
- The "parent context" of a node is the context that is one - The "parent context" of a node is the context that is one
symbol shorter than the node's context and includes the symbol shorter than the node's context and includes the
......
...@@ -730,7 +730,7 @@ namespace dlib ...@@ -730,7 +730,7 @@ namespace dlib
typematic action begins (note that some keys might not have any typematic action begins (note that some keys might not have any
typematic action on some platforms). typematic action on some platforms).
- if (is_printable) then - if (is_printable) then
- key == the character that was pressed. (e.g. 'a', 'b', '1' etc...) - key == the character that was pressed. (e.g. 'a', 'b', '1' etc.)
- this is a printable character. Note that ' ', '\t', and - this is a printable character. Note that ' ', '\t', and
'\n' (this is the return/enter key) are all considered printable. '\n' (this is the return/enter key) are all considered printable.
- else - else
......
...@@ -87,7 +87,7 @@ namespace dlib ...@@ -87,7 +87,7 @@ namespace dlib
ensures ensures
- updates the prediction for the current context. - updates the prediction for the current context.
(the current context is the last few symbols seen. i.e. (*this)[0], (the current context is the last few symbols seen. i.e. (*this)[0],
(*this)[1], etc...) (*this)[1], etc.)
- if (*this can generate a prediction) then - if (*this can generate a prediction) then
- #index == the predicted location of a match in the history buffer. - #index == the predicted location of a match in the history buffer.
(i.e. (*this)[#index] is the first symbol of the predicted match) (i.e. (*this)[#index] is the first symbol of the predicted match)
......
...@@ -114,7 +114,7 @@ DLIB_MATRIX_SIMPLE_STD_FUNCTION(atan,7) ...@@ -114,7 +114,7 @@ DLIB_MATRIX_SIMPLE_STD_FUNCTION(atan,7)
const matrix_exp<EXP>& m const matrix_exp<EXP>& m
) )
{ {
// you can only round matrices that contain built in scalar types like double, long, float, etc... // you can only round matrices that contain built in scalar types like double, long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
typedef matrix_scalar_binary_exp<EXP,typename EXP::type, op_round_zeros> exp; typedef matrix_scalar_binary_exp<EXP,typename EXP::type, op_round_zeros> exp;
return exp(m.ref(),10*std::numeric_limits<typename EXP::type>::epsilon()); return exp(m.ref(),10*std::numeric_limits<typename EXP::type>::epsilon());
...@@ -128,7 +128,7 @@ DLIB_MATRIX_SIMPLE_STD_FUNCTION(atan,7) ...@@ -128,7 +128,7 @@ DLIB_MATRIX_SIMPLE_STD_FUNCTION(atan,7)
typename EXP::type eps typename EXP::type eps
) )
{ {
// you can only round matrices that contain built in scalar types like double, long, float, etc... // you can only round matrices that contain built in scalar types like double, long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,typename EXP::type, op_round_zeros>(m.ref(),eps); return matrix_scalar_binary_exp<EXP,typename EXP::type, op_round_zeros>(m.ref(),eps);
} }
...@@ -417,7 +417,7 @@ DLIB_MATRIX_SIMPLE_STD_FUNCTION(atan,7) ...@@ -417,7 +417,7 @@ DLIB_MATRIX_SIMPLE_STD_FUNCTION(atan,7)
const matrix_exp<EXP>& m const matrix_exp<EXP>& m
) )
{ {
// you can only round matrices that contain built in scalar types like double, long, float, etc... // you can only round matrices that contain built in scalar types like double, long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
typedef matrix_unary_exp<EXP,op_round> exp; typedef matrix_unary_exp<EXP,op_round> exp;
return exp(m.ref()); return exp(m.ref());
......
...@@ -234,7 +234,7 @@ namespace dlib ...@@ -234,7 +234,7 @@ namespace dlib
/*! /*!
requires requires
- is_built_in_scalar_type<matrix_exp::type>::value == true - is_built_in_scalar_type<matrix_exp::type>::value == true
(i.e. m must contain a type like int, float, double, long, etc...) (i.e. m must contain a type like int, float, double, long, etc.)
ensures ensures
- if (m contains integers) then - if (m contains integers) then
- returns m unmodified - returns m unmodified
...@@ -282,7 +282,7 @@ namespace dlib ...@@ -282,7 +282,7 @@ namespace dlib
/*! /*!
requires requires
- is_built_in_scalar_type<matrix_exp::type>::value == true - is_built_in_scalar_type<matrix_exp::type>::value == true
(i.e. m must contain a type like int, float, double, long, etc...) (i.e. m must contain a type like int, float, double, long, etc.)
ensures ensures
- if (m contains integers) then - if (m contains integers) then
- returns m unmodified - returns m unmodified
...@@ -307,7 +307,7 @@ namespace dlib ...@@ -307,7 +307,7 @@ namespace dlib
/*! /*!
requires requires
- is_built_in_scalar_type<matrix_exp::type>::value == true - is_built_in_scalar_type<matrix_exp::type>::value == true
(i.e. m must contain a type like int, float, double, long, etc...) (i.e. m must contain a type like int, float, double, long, etc.)
ensures ensures
- returns a matrix R such that: - returns a matrix R such that:
- R::type == the same type that was in m - R::type == the same type that was in m
......
...@@ -982,7 +982,7 @@ namespace dlib ...@@ -982,7 +982,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_lessthan>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_lessthan>(m.ref(),s);
...@@ -998,7 +998,7 @@ namespace dlib ...@@ -998,7 +998,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_lessthan>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_lessthan>(m.ref(),s);
...@@ -1035,7 +1035,7 @@ namespace dlib ...@@ -1035,7 +1035,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_lessthan_eq>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_lessthan_eq>(m.ref(),s);
...@@ -1051,7 +1051,7 @@ namespace dlib ...@@ -1051,7 +1051,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_lessthan_eq>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_lessthan_eq>(m.ref(),s);
...@@ -1088,7 +1088,7 @@ namespace dlib ...@@ -1088,7 +1088,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_greaterthan>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_greaterthan>(m.ref(),s);
...@@ -1104,7 +1104,7 @@ namespace dlib ...@@ -1104,7 +1104,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_greaterthan>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_greaterthan>(m.ref(),s);
...@@ -1141,7 +1141,7 @@ namespace dlib ...@@ -1141,7 +1141,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_greaterthan_eq>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_greaterthan_eq>(m.ref(),s);
...@@ -1157,7 +1157,7 @@ namespace dlib ...@@ -1157,7 +1157,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_greaterthan_eq>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_greaterthan_eq>(m.ref(),s);
...@@ -1194,7 +1194,7 @@ namespace dlib ...@@ -1194,7 +1194,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_equal_to>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_equal_to>(m.ref(),s);
...@@ -1210,7 +1210,7 @@ namespace dlib ...@@ -1210,7 +1210,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT( is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_equal_to>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_equal_to>(m.ref(),s);
...@@ -1247,7 +1247,7 @@ namespace dlib ...@@ -1247,7 +1247,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_not_equal_to>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_not_equal_to>(m.ref(),s);
...@@ -1263,7 +1263,7 @@ namespace dlib ...@@ -1263,7 +1263,7 @@ namespace dlib
) )
{ {
// you can only use this relational operator with the built in scalar types like // you can only use this relational operator with the built in scalar types like
// long, float, etc... // long, float, etc.
COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value); COMPILE_TIME_ASSERT(is_built_in_scalar_type<typename EXP::type>::value);
return matrix_scalar_binary_exp<EXP,S, op_not_equal_to>(m.ref(),s); return matrix_scalar_binary_exp<EXP,S, op_not_equal_to>(m.ref(),s);
......
...@@ -46,7 +46,7 @@ namespace dlib ...@@ -46,7 +46,7 @@ namespace dlib
out->item[out_pos] == current() out->item[out_pos] == current()
when enqueuing elements inside each node item[0] is filled first, then when enqueuing elements inside each node item[0] is filled first, then
item[1], then item[2], etc... item[1], then item[2], etc.
each node points to the node inserted after it except for the most each node points to the node inserted after it except for the most
......
...@@ -126,7 +126,7 @@ namespace dlib ...@@ -126,7 +126,7 @@ namespace dlib
ensures ensures
- item has been concatenated onto the end of *this - item has been concatenated onto the end of *this
i.e. item[0] becomes (#*this)[size()], item[1] i.e. item[0] becomes (#*this)[size()], item[1]
becomes (#*this)[size()+1], etc... becomes (#*this)[size()+1], etc.
- #size() == size() + item.size() - #size() == size() + item.size()
- #item has its initial value - #item has its initial value
- #at_start() == true - #at_start() == true
......
...@@ -106,7 +106,7 @@ namespace dlib ...@@ -106,7 +106,7 @@ namespace dlib
// loop over all the addrinfo structures and add them to the set. the reason for doing // loop over all the addrinfo structures and add them to the set. the reason for doing
// this dumb crap is because different platforms return all kinds of weird garbage. many // this dumb crap is because different platforms return all kinds of weird garbage. many
// return the same ip multiple times, etc... // return the same ip multiple times, etc.
while (result != 0) while (result != 0)
{ {
char temp[16]; char temp[16];
......
...@@ -431,7 +431,7 @@ namespace dlib ...@@ -431,7 +431,7 @@ namespace dlib
{ {
/*! /*!
REQUIREMENTS ON T REQUIREMENTS ON T
T must be a kernel object (e.g. radial_basis_kernel, polynomial_kernel, etc...) T must be a kernel object (e.g. radial_basis_kernel, polynomial_kernel, etc.)
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object represents a kernel with a fixed value offset This object represents a kernel with a fixed value offset
......
...@@ -19,7 +19,7 @@ namespace dlib ...@@ -19,7 +19,7 @@ namespace dlib
/*! /*!
REQUIREMENTS ON dec_funct_type REQUIREMENTS ON dec_funct_type
dec_funct_type can be any copyable type that provides the needed dec_funct_type can be any copyable type that provides the needed
typedefs used below (e.g. kernel_type, scalar_type, etc...). typedefs used below (e.g. kernel_type, scalar_type, etc.).
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object is a simple tool for turning a decision function This object is a simple tool for turning a decision function
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment