/* ----------------------------------------------------------------------------

nlmdl: status.h

nlmdl is a C++ implementation of the statistical methods in A. Ronald 
Gallant, "Nonlinear Statistical Models," New York: John Wiley and Sons, 
1987, ISBN 0-471-80260-3, using a matrix class realmat that is distributed 
with it.  The header files nlmdl.h and realmat.h describe the use of the 
program and matrix class, respectively.  

Copyright (C) 1990, 1991, 1993, 1994, 2002.

A. Ronald Gallant
Post Office Box 659
Chapel Hill NC 27514-0659 
USA   

Permission to use, copy, modify, and distribute this software and its 
documentation for any purpose and without fee is hereby granted, provided 
that the above copyright notice appears in all copies and that both that 
copyright notice and this permission notice appear in supporting 
documentation.  

This software is provided "as is" without any expressed or implied warranty.

---------------------------------------------------------------------------- */
/* status is a class used by nlmdl */

#ifndef __FILE_STATUS_H_SEEN__

#include "usual.h"
#include "realmat.h"
#include "tools.h"
using namespace std;
using namespace tools;

#define MAX_STATUS_LINE    256
#define STARTING_FILENAME  "starting.dat"
#define ENDING_FILENAME    "ending.dat"

enum display_mode {START_UP, VAR_ITERATE, THETA_ITERATE, TERMINATION};

class status 
{
public:
            status();
            ~status();

  char      switches[MAX_STATUS_LINE];
  char      method[MAX_STATUS_LINE];
  INTEGER   n;
  INTEGER   M;
  INTEGER   K;
  INTEGER   p;
  INTEGER   itheta;
  INTEGER   ivar;
  char      vartype[MAX_STATUS_LINE];
  INTEGER   MA;
  char      weights[MAX_STATUS_LINE];
  REAL      tol;
  REAL      eps;
  char      detail[MAX_STATUS_LINE];
  INTEGER   rank;
  char      df[MAX_STATUS_LINE];
  realmat   theta;
  realmat   var;
  realmat   V;
  realmat   D;
  REAL      obj;

  char*     starting; 
  char*     ending;

  int       from(char* filename);
  int       to(char* filename);
  int       display(display_mode);

};

#define __FILE_STATUS_H_SEEN__ 1
#endif

