NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
silu.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef GRAPH_FACTORS_SILU_H_
20 #define GRAPH_FACTORS_SILU_H_
21 
22 #include <gtsam/base/OptionalJacobian.h>
23 
24 namespace graph_factors {
25 // Sigmoid linear unit function
26 double Silu(const double x, gtsam::OptionalJacobian<1, 1> d_silu_d_x = boost::none);
27 
28 double SiluWithOffset(const double x, const double offset, gtsam::OptionalJacobian<1, 1> d_silu_d_x = boost::none);
29 
30 // Create silu that creates a two way ramp: __/
31 // /
32 // centered at x = 0 rather than a single ramp _/ Note that this is discontinous at x = 0.
33 double SiluWithOffsetTwoWay(const double x, const double offset,
34  gtsam::OptionalJacobian<1, 1> d_silu_d_x = boost::none);
35 } // namespace graph_factors
36 
37 #endif // GRAPH_FACTORS_SILU_H_
graph_factors::SiluWithOffsetTwoWay
double SiluWithOffsetTwoWay(const double x, const double offset, gtsam::OptionalJacobian< 1, 1 > d_silu_d_x=boost::none)
Definition: silu.cc:37
graph_factors
Definition: silu.h:24
graph_factors::Silu
double Silu(const double x, gtsam::OptionalJacobian< 1, 1 > d_silu_d_x=boost::none)
Definition: silu.cc:24
graph_factors::SiluWithOffset
double SiluWithOffset(const double x, const double offset, gtsam::OptionalJacobian< 1, 1 > d_silu_d_x=boost::none)
Definition: silu.cc:32