// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #pragma once #ifndef L1_UTILITIES_HPP #define L1_UTILITIES_HPP #include //#include "ROL_BoundConstraint.hpp" //#include "ROL_Constraint.hpp" //#include "ROL_Objective.hpp" #include "ROL_PartitionedVector.hpp" //#include "ROL_Ptr.hpp" namespace ROL { //template class L1PenaltyObjective; //template class L1PenaltyConstraint; namespace detail { template inline auto pv_cast( const Vector& x ) { return static_cast&>(x); } template inline auto pv_cast( Vector& x ) { return static_cast&>(x); } //template class Derived, typename Real> //struct Base {}; // //template //struct Base { using type = Vector; }; // //template //struct Base { using type = BoundConstraint; }; // //template //struct Base { using type = Constraint; }; // //template //struct Base { using type = Objective; }; } // namespace detail auto&& pv_cast = []( auto&&...args ) { return std::make_tuple(detail::pv_cast(args)...); }; //template //inline auto up_cast( const Ptr>& x ) { // return staticPtrCast>(x); //} // //template //inline auto up_cast( const Ptr>& x ) { // return staticPtrCast>(x); //} // //template class C, typename T> //using base_t = typename detail::Base::type; // //template class Derived, typename Real> //inline auto up_cast( const Ptr>& x ) { // return staticPtrCast>(x); //} // //template class Derived, typename Real> //inline auto up_cast( const Ptr>& x ) { // return staticPtrCast>(x); //} //template //inline auto up_cast( const Ptr>& x ) { // return staticPtrCast>(x); //} // //template //inline auto up_cast( const Ptr>& x ) { // return staticPtrCast>(x); //} } // namespace ROL #endif //L1_UTILITIES_HPP