NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
cumulative_factor.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_CUMULATIVE_FACTOR_H_
20 #define GRAPH_FACTORS_CUMULATIVE_FACTOR_H_
21 
22 #include <gtsam/nonlinear/NonlinearFactor.h>
23 
24 #include <unordered_set>
25 
26 namespace gtsam {
27 // Base case for cumulative factors which have a variable-sized set of measurements and keys accumulated
28 // over time. When using with a sliding window graph, old measurements and keys should
29 // be removed instead of removing the entire factor.
31  public:
32  virtual ~CumulativeFactor() = default;
33 
34  // Returns a copy of the factor with keys in keys_to_remove removed along with
35  // any associated measurements.
36  virtual boost::shared_ptr<NonlinearFactor> PrunedCopy(const std::unordered_set<gtsam::Key>& keys_to_remove) const = 0;
37 };
38 } // namespace gtsam
39 
40 #endif // GRAPH_FACTORS_CUMULATIVE_FACTOR_H_
gtsam::CumulativeFactor::~CumulativeFactor
virtual ~CumulativeFactor()=default
gtsam::CumulativeFactor::PrunedCopy
virtual boost::shared_ptr< NonlinearFactor > PrunedCopy(const std::unordered_set< gtsam::Key > &keys_to_remove) const =0
gtsam::CumulativeFactor
Definition: cumulative_factor.h:30
gtsam
Definition: cumulative_factor.h:26