gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtsam::Point2 Class Reference
+ Inheritance diagram for gtsam::Point2:

Advanced Constructors

 Point2 (const Vector &v)
 construct from 2D vector
 
static boost::optional< Point2CircleCircleIntersection (double R_d, double r_d, double tol=1e-9)
 
static std::list< Point2CircleCircleIntersection (Point2 c1, Point2 c2, boost::optional< Point2 >)
 
static std::list< Point2CircleCircleIntersection (Point2 c1, double r1, Point2 c2, double r2, double tol=1e-9)
 Intersect 2 circles. More...
 

Group

Point2 inverse () const
 "Inverse" - negates each coordinate such that compose(p,inverse(p)) == identity()
 
Point2 operator- () const
 syntactic sugar for inverse, i.e., -p == inverse(p)
 
Point2 compose (const Point2 &q, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 "Compose", just adds the coordinates of two points. With optional derivatives
 
Point2 operator+ (const Point2 &q) const
 syntactic sugar for adding two points, i.e., p+q == compose(p,q)
 
Point2 between (const Point2 &q, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 "Between", subtracts point coordinates. between(p,q) == compose(inverse(p),q)
 
Point2 operator- (const Point2 &q) const
 syntactic sugar for subtracting points, i.e., q-p == between(p,q)
 
static Point2 identity ()
 identity
 

Manifold

size_t dim () const
 Dimensionality of tangent space = 2 DOF.
 
Point2 retract (const Vector &v) const
 Updates a with tangent space delta.
 
Vector localCoordinates (const Point2 &t2) const
 Local coordinates of manifold neighborhood around current value.
 
static size_t Dim ()
 dimension of the variable - used to autodetect sizes
 

Advanced Interface

class boost::serialization::access
 Serialization function.
 

Public Member Functions

Standard Constructors
 Point2 ()
 default constructor
 
 Point2 (double x, double y)
 construct from doubles
 
Testable
void print (const std::string &s="") const
 print with optional string
 
bool equals (const Point2 &q, double tol=1e-9) const
 equals with an tolerance, prints out message if unequal
 
Vector Space
Point2 unit () const
 creates a unit vector
 
double norm (boost::optional< Matrix & > H=boost::none) const
 norm of point
 
double distance (const Point2 &p2, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 distance between two points
 
double dist (const Point2 &p2) const
 
Point2 operator* (double s) const
 multiply with a scalar
 
Point2 operator/ (double q) const
 divide by a scalar
 
Standard Interface
bool operator== (const Point2 &q) const
 equality
 
double x () const
 get x
 
double y () const
 get y
 
Vector2 vector () const
 return vectorized form (column-wise). TODO: why does this function exist?
 
Deprecated (non-const, non-functional style. Do not use).
void operator+= (const Point2 &q)
 
void operator*= (double s)
 
- Public Member Functions inherited from gtsam::DerivedValue< Point2 >
virtual Valueclone_ () const
 Create a duplicate object returned as a pointer to the generic Value interface. More...
 
virtual void deallocate_ () const
 Destroy and deallocate this object, only if it was originally allocated using clone_().
 
virtual boost::shared_ptr< Valueclone () const
 Clone this value (normal clone on the heap, delete with 'delete' operator)
 
virtual bool equals_ (const Value &p, double tol=1e-9) const
 equals implementing generic Value interface
 
virtual Valueretract_ (const Vector &delta) const
 Generic Value interface version of retract.
 
virtual Vector localCoordinates_ (const Value &value2) const
 Generic Value interface version of localCoordinates.
 
virtual Valueoperator= (const Value &rhs)
 Assignment operator.
 
 operator const Point2 & () const
 Conversion to the derived class.
 
 operator Point2 & ()
 Conversion to the derived class.
 
- Public Member Functions inherited from gtsam::Value
virtual ~Value ()
 Virutal destructor.
 

Static Public Member Functions

Lie Group
static Point2 Expmap (const Vector &v)
 Exponential map around identity - just create a Point2 from a vector.
 
static Vector Logmap (const Point2 &dp)
 Log map around identity - just return the Point2 as a vector.
 

Static Public Attributes

static const size_t dimension = 2
 dimension of the variable - used to autodetect sizes
 

Friends

GTSAM_EXPORT friend std::ostream & operator<< (std::ostream &os, const Point2 &p)
 Streaming.
 

Additional Inherited Members

- Protected Member Functions inherited from gtsam::DerivedValue< Point2 >
DerivedValue< Point2 > & operator= (const DerivedValue< Point2 > &rhs)
 Assignment operator, protected because only the Value or DERIVED assignment operators should be used. More...
 

Member Function Documentation

list< Point2 > gtsam::Point2::CircleCircleIntersection ( Point2  c1,
double  r1,
Point2  c2,
double  r2,
double  tol = 1e-9 
)
static

Intersect 2 circles.

Parameters
c1center of first circle
r1radius of first circle
c2center of second circle
r2radius of second circle
tolabsolute tolerance below which we consider touching circles
Returns
list of solutions (0,1, or 2). Identical circles will return empty list, as well.
double gtsam::Point2::dist ( const Point2 p2) const
inline
Deprecated:
The following function has been deprecated, use distance above

The documentation for this class was generated from the following files: