Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
2ad9cd78
Commit
2ad9cd78
authored
Nov 25, 2017
by
Davis King
Browse files
Fixing code for visual studio
parent
04991b7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
dlib/global_optimization/find_max_global.h
dlib/global_optimization/find_max_global.h
+8
-8
No files found.
dlib/global_optimization/find_max_global.h
View file @
2ad9cd78
...
...
@@ -71,14 +71,14 @@ namespace dlib
template
<
size_t
max_unpack
>
struct
call_function_and_expand_args
{
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
disable_decay_to_scalar
(
a
))
{
return
f
(
disable_decay_to_scalar
(
a
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
a
(
0
))
{
DLIB_CASSERT
(
a
.
size
()
==
1
);
return
f
(
a
(
0
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
a
(
0
),
a
(
1
))
{
DLIB_CASSERT
(
a
.
size
()
==
2
);
return
f
(
a
(
0
),
a
(
1
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
a
(
0
),
a
(
1
),
a
(
2
))
{
DLIB_CASSERT
(
a
.
size
()
==
3
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
))
{
DLIB_CASSERT
(
a
.
size
()
==
4
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
))
{
DLIB_CASSERT
(
a
.
size
()
==
5
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
))
{
DLIB_CASSERT
(
a
.
size
()
==
6
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
std
::
forward
<
T
>
(
f
),
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
),
a
(
6
))
{
DLIB_CASSERT
(
a
.
size
()
==
7
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
),
a
(
6
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
disable_decay_to_scalar
(
a
))
)
{
return
f
(
disable_decay_to_scalar
(
a
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
a
(
0
))
)
{
DLIB_CASSERT
(
a
.
size
()
==
1
);
return
f
(
a
(
0
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
a
(
0
),
a
(
1
))
)
{
DLIB_CASSERT
(
a
.
size
()
==
2
);
return
f
(
a
(
0
),
a
(
1
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
a
(
0
),
a
(
1
),
a
(
2
))
)
{
DLIB_CASSERT
(
a
.
size
()
==
3
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
))
)
{
DLIB_CASSERT
(
a
.
size
()
==
4
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
))
)
{
DLIB_CASSERT
(
a
.
size
()
==
5
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
))
)
{
DLIB_CASSERT
(
a
.
size
()
==
6
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
));
}
template
<
typename
T
>
static
auto
go
(
T
&&
f
,
const
matrix
<
double
,
0
,
1
>&
a
)
->
decltype
(
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
),
a
(
6
))
)
{
DLIB_CASSERT
(
a
.
size
()
==
7
);
return
f
(
a
(
0
),
a
(
1
),
a
(
2
),
a
(
3
),
a
(
4
),
a
(
5
),
a
(
6
));
}
};
#endif
}
...
...
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