Sha256: 953c18341ec72650fce9588a2aec8604aadf91d855b07679b2e2562b360b793f
Contents?: true
Size: 998 Bytes
Versions: 4
Compression:
Stored size: 998 Bytes
Contents
/* * * Copyright (C) 2015 Jason Gowan * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef BASE_CONSTRAINT_HANDLER_H_ #define BASE_CONSTRAINT_HANDLER_H_ #include <vector> #include "dither_types.h" namespace dither { class BaseConstraintHandler { public: BaseConstraintHandler(){}; virtual ~BaseConstraintHandler(){}; virtual bool violate_constraints(const dtest_case &test_case) { return false; } virtual bool violate_constraints(const std::vector<param *> &test_case) { return false; } virtual bool violate_constraints(param **test_case, const std::size_t length) { return false; } virtual bool ground(dtest_case &test_case) { for (auto it = test_case.begin(); it != test_case.end(); ++it) { if ((*it) == -1) { *it = 0; } } return true; } }; } #endif // BASE_CONSTRAINT_HANDLER_H_
Version data entries
4 entries across 4 versions & 1 rubygems