/*
 * class FullVector
 *
 * $Date$
 * $Revision$
 *
 */

#ifndef FULL_VECTOR_HH__
#define FULL_VECTOR_HH__

#include "WImage/ImageVector.hh"

/** 
 * @addtogroup WImage 
 * @{ */

/**
 * Full reference. A reference to a one-dimensional array.
 */
class 
FullVector: public ImageVector
{
public:
  
  /** Constructor. As we've got no default constructor we need to 
   * call the mother's class' constructor here... */
  FullVector (ImageArray<coeff> *ar) : ImageVector (ar) 
  { m_xysize = m_xsize * m_ysize; go (0); }
  /** Destructor. Does nothing. */
  virtual ~FullVector (void) { } 

  /** Sets a new root. In this context this ``new root'' means a new row.
   * @exception invalid_argument
   * the new root is greater than the number of rows
   * @param root 
   * the new row */
  virtual void go (int root);
  /** Get a value. Return the value at a given column from the current row.
   * @exception invalid_argument
   * a negative value was given for the new root
   * @param pos
   * the column 
   * @return the value */
  virtual coeff at (int pos);
  /** Assigns a new value. Sets a new value at a given column from 
   * the current row.
   * @param pos
   * the column
   * @param val
   * the new value */
  virtual void to (int pos, coeff val);
  /** The vector's size. Returns the vector's size (the number of cols)
   * @return the number of cols */
  virtual int size (void);
  /** Updates the vector's settings. This is necessary each time after
   * the array has been resized. */
  virtual void update (void);

private:
  /** The encapsulated array's size. */
  int m_xysize;
}; /* class FullVector */

/** @} */

#endif /* FULL_VECTOR_HH__ */
