Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F75775272
ncp_functions.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Aug 4, 04:52
Size
713 B
Mime Type
text/x-c
Expires
Tue, Aug 6, 04:52 (2 d)
Engine
blob
Format
Raw Data
Handle
19560146
Attached To
rSPECMICP SpecMiCP / ReactMiCP
ncp_functions.cpp
View Options
#include "catch.hpp"
#include "specmicp_common/micpsolver/ncp_function.hpp"
TEST_CASE("Box constrained VI", "[VI],[B-function]")
{
SECTION("Function")
{
auto vi_func = specmicp::micpsolver::box_constrained_vi_b_function<double>;
CHECK(vi_func(0.0, 2.0, 0.0, 5.0) == 0.0);
CHECK(vi_func(5.0, -3.0, 0.0, 5.0) == 0.0);
CHECK(vi_func(2.0, 0.0, 0.0, 5.0) == 0.0);
CHECK(vi_func(2.0, 3.0, 0.0, 5.0) != 0.0);
CHECK(vi_func(-2.0, 3.0, 0.0, 5.0) != 0.0);
CHECK(vi_func(8.0, -2.0, 0.0, 5.0) != 0.0);
CHECK(vi_func(0.0, 0.0, 0.0, 5.0) == 0.0);
CHECK(vi_func(5.0, 0.0, 0.0, 5.0) == 0.0);
}
SECTION("Jacobian")
{
}
}
Event Timeline
Log In to Comment