-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ContractorNetworks in Codac2 version
- Loading branch information
1 parent
e77c0ac
commit 47bbc52
Showing
15 changed files
with
313 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* \file | ||
* | ||
* ---------------------------------------------------------------------------- | ||
* \date 2023 | ||
* \author Simon Rohou | ||
* \copyright Copyright 2023 Codac Team | ||
* \license This program is distributed under the terms of | ||
* the GNU Lesser General Public License (LGPL). | ||
*/ | ||
|
||
#ifndef __CODAC2_CTCCN_H__ | ||
#define __CODAC2_CTCCN_H__ | ||
|
||
#include "codac2_Contractor.h" | ||
#include "codac2_ContractorNetwork.h" | ||
|
||
namespace codac2 | ||
{ | ||
template<int N> | ||
class CtcCN : public ContractorOnBox<N> | ||
{ | ||
public: | ||
|
||
CtcCN(ContractorNetwork& cn, Var<IntervalVector_<N>>& var) | ||
: _cn(cn), _ref_var(&var) | ||
{ | ||
|
||
} | ||
|
||
void contract(IntervalVector_<N>& x) | ||
{ | ||
_cn.reset_all_vars(); | ||
_cn.reset_var(_ref_var,x); | ||
_cn.trigger_all_contractors(); | ||
_cn.contract(false); | ||
x = *_ref_var; | ||
} | ||
|
||
make_available_in_cn__templated(CtcCN<N>) | ||
|
||
protected: | ||
|
||
ContractorNetwork& _cn; | ||
const Var<IntervalVector_<N>>* _ref_var; | ||
}; | ||
} | ||
|
||
#endif |
Oops, something went wrong.