EleFits  5.3.0
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches
Static Public Member Functions | Public Member Functions | Public Attributes | Related Functions | List of all members
Segment Struct Reference

#include <Segment.h>

Detailed Description

Bounds of a closed index interval.

The lower and upper bounds are named front and back to match Segment wording. This also avoids confusion when working with table segments, where the lower bound is upward the upper bound.

Static Public Member Functions

static Segment fromSize (long front, long size)
 Create a segment specified by a lower bound and size.
 
static Segment whole ()
 Create a maximal segment (from index 0 to max).
 

Public Member Functions

long size () const
 Get the number of elements.
 

Public Attributes

long back
 The upper bound.
 
long front
 The lower bound.
 

Related Functions

(Note that these are not member functions.)

bool operator!= (const Segment &lhs, const Segment &rhs)
 Check whether two segments are different.
 
Segment operator+ (const Segment &lhs, long rhs)
 Add a segment and a scalar.
 
Segment operator+ (const Segment &rhs)
 Identity.
 
Segmentoperator++ (Segment &lhs)
 Add 1.
 
Segment operator++ (Segment &lhs, int)
 Return the current segment and then add 1.
 
Segmentoperator+= (Segment &lhs, long rhs)
 Add a scalar.
 
Segment operator- (const Segment &lhs, long rhs)
 Subtract a segment and a scalar.
 
Segment operator- (const Segment &rhs)
 Change the sign of each coordinate.
 
Segmentoperator-- (Segment &lhs)
 Subtract 1.
 
Segment operator-- (Segment &lhs, int)
 Return the current segment and then subtract 1.
 
Segmentoperator-= (Segment &lhs, long rhs)
 Subtract a scalar.
 
bool operator== (const Segment &lhs, const Segment &rhs)
 Check whether two segments are equal.
 

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