codac
codac::CtcSegment Class Reference

Minimal contractor for a segment. More...

#include <codac_CtcSegment.h>

Inherits Ctc.

## Public Member Functions

CtcSegment (double ax, double ay, double bx, double by)
create the contractor for a fixed segment. More...

CtcSegment ()
create the contractor for "x in a segment [a,b]". More...

virtual void contract (IntervalVector &box)
Contract a box. More...

~CtcSegment ()
Delete this.

## Protected Attributes

IntervalVector X_with_params

NumConstraint * ncf

CtcFwdBwd * ctc_f

## Detailed Description

Minimal contractor for a segment.

## ◆ CtcSegment() [1/2]

 codac::CtcSegment::CtcSegment ( double ax, double ay, double bx, double by )

create the contractor for a fixed segment.

The segment is [a, b] where a = (ax, ay) and b = (bx, by).

This contractor is associated with the set of all points which are on the segment, which is fixed. It works with 2 variables.

Parameters
 ax : x coordinate of the start of the segment ay : y coordinate of the start of the segment bx : x coordinate of the end of the segment by : y coordinate of the end of the segment

## ◆ CtcSegment() [2/2]

 codac::CtcSegment::CtcSegment ( )

create the contractor for "x in a segment [a,b]".

In this constructor, x, a and b are considered as variables. The segment is not fixed and may have uncertain endpoints.

This contractor works with 6 variables. [gch]: question: is it still optimal in this case??

## ◆ contract()

 virtual void codac::CtcSegment::contract ( IntervalVector & box )
virtual

Contract a box.

Parameters
 box to be contracted

## ◆ X_with_params

 IntervalVector codac::CtcSegment::X_with_params
protected

Box which contains the box to be contracted and the segment parameters. Only used when the segment is fixed.

## ◆ ncf

 NumConstraint* codac::CtcSegment::ncf
protected

Constraint used by the contractor : the point must belong the the line and to the box which encloses the segment

## ◆ ctc_f

 CtcFwdBwd* codac::CtcSegment::ctc_f
protected

Contractors associated to ncf and ncg.

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