/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: Frank Dellaert, et al. (see THANKS for the full author list) * See LICENSE for the license information * -------------------------------------------------------------------------- */ /** * @file IndexConditional.h * @brief * @author Richard Roberts * @created Oct 17, 2010 */ #pragma once #include #include namespace gtsam { class IndexFactor; class IndexConditional : public ConditionalBase { public: typedef IndexConditional This; typedef ConditionalBase Base; typedef IndexFactor Factor; typedef boost::shared_ptr shared_ptr; /** Empty Constructor to make serialization possible */ IndexConditional() {} /** No parents */ IndexConditional(Index j) : Base(j) {} /** Single parent */ IndexConditional(Index j, Index parent) : Base(j, parent) {} /** Two parents */ IndexConditional(Index j, Index parent1, Index parent2) : Base(j, parent1, parent2) {} /** Three parents */ IndexConditional(Index j, Index parent1, Index parent2, Index parent3) : Base(j, parent1, parent2, parent3) {} /** Constructor from a frontal variable and a vector of parents */ IndexConditional(Index j, const std::vector& parents) : Base(j, parents) {} /** Constructor from a frontal variable and an iterator range of parents */ template static shared_ptr FromRange(Index j, ITERATOR firstParent, ITERATOR lastParent) { return Base::FromRange(j, firstParent, lastParent); } /** Named constructor from any number of frontal variables and parents */ template static shared_ptr FromRange(ITERATOR firstKey, ITERATOR lastKey, size_t nrFrontals) { return Base::FromRange(firstKey, lastKey, nrFrontals); } }; }