COPASI API  4.16.103
Macros | Functions | Variables
CPraxis.cpp File Reference
#include <cmath>
#include <stdio.h>
#include "copasi.h"
#include "CPraxis.h"
#include "randomGenerator/CRandom.h"
Include dependency graph for CPraxis.cpp:

Go to the source code of this file.

Macros

#define dmax(a1, a2)   ((a1 > a2) ? a1 : a2)
 
#define dmin(a1, a2)   ((a1 < a2) ? a1 : a2)
 
#define FALSE_   (0)
 
#define TRUE_   (1)
 

Functions

int maprnt_ (C_INT *, C_FLOAT64 *, C_INT *, C_INT *)
 
int sort_ (C_INT *, C_INT *, C_FLOAT64 *, C_FLOAT64 *)
 
int vcprnt_ (C_INT *, C_FLOAT64 *, C_INT *)
 

Variables

static C_INT c__0 = 0
 
static C_INT c__1 = 1
 
static C_INT c__2 = 2
 
static C_INT c__3 = 3
 
static C_INT c__4 = 4
 
static bool c_false = (0)
 
static bool c_true = (1)
 

Macro Definition Documentation

#define dmax (   a1,
  a2 
)    ((a1 > a2) ? a1 : a2)

Definition at line 45 of file CPraxis.cpp.

Referenced by CPraxis::min_().

#define dmin (   a1,
  a2 
)    ((a1 < a2) ? a1 : a2)

Definition at line 46 of file CPraxis.cpp.

Referenced by CPraxis::min_().

#define FALSE_   (0)

Definition at line 44 of file CPraxis.cpp.

Referenced by CPraxis::praxis_().

#define TRUE_   (1)

Definition at line 43 of file CPraxis.cpp.

Referenced by CPraxis::min_(), and CPraxis::praxis_().

Function Documentation

int maprnt_ ( C_INT ,
C_FLOAT64 ,
C_INT ,
C_INT  
)

Definition at line 1910 of file CPraxis.cpp.

References C_INT.

Referenced by CPraxis::praxis_().

1912 {
1913 #ifdef XXXX
1914  /* System generated locals */
1915  C_INT v_dim1, v_offset, i__1, i__2;
1916 
1917  /* Local variables */
1918  C_INT i, j, low, upp;
1919 
1920  /* ...THE SUBROUTINE MAPRNT PRINTS THE COLUMNS OF THE NXN MATRIX V */
1921  /* WITH A HEADING AS SPECIFIED BY OPTION. */
1922  /* M IS THE ROW DIMENSION OF V AS DECLARED IN THE CALLING PROGRAM... */
1923  /* Parameter adjustments */
1924  v_dim1 = *m;
1925  v_offset = v_dim1 + 1;
1926  v -= v_offset;
1927 
1928  /* Function Body */
1929  low = 1;
1930  upp = 5;
1931 
1932  switch ((int)*option)
1933  {
1934  case 1: goto L1;
1935  case 2: goto L2;
1936  }
1937 
1938 L1:
1939  printf("HE NEW DIRECTIONS ARE:\n");
1940  goto L3;
1941 L2:
1942  printf("AND THE PRINCIPAL AXES:\n");
1943 L3:
1944 
1945  if (*n < upp)
1946  {
1947  upp = *n;
1948  }
1949 
1950  i__1 = *n;
1951 
1952  for (i = 1; i <= i__1; ++i)
1953  {
1954  /* L4: */
1955  printf("%3d", i);
1956  i__2 = upp;
1957 
1958  for (j = low; j <= i__2; ++j)
1959  {
1960  printf(" %12g", v[i*v_dim1 + j]);
1961  }
1962 
1963  printf("\n");
1964  }
1965 
1966  low += 5;
1967 
1968  if (*n < low)
1969  {
1970  return 0;
1971  }
1972 
1973  upp += 5;
1974  goto L3;
1975 
1976 #endif // XXXX
1977 
1978  return 0;
1979 } /* maprnt_ */
#define C_INT
Definition: copasi.h:115
int sort_ ( C_INT m,
C_INT n,
C_FLOAT64 d__,
C_FLOAT64 v 
)

Definition at line 1644 of file CPraxis.cpp.

References C_FLOAT64, and C_INT.

Referenced by CPraxis::praxis_().

1646 {
1647  /* System generated locals */
1648  C_INT v_dim1, v_offset, i__1, i__2;
1649 
1650  /* Local variables */
1651  static C_INT i__, j, k;
1652  static C_FLOAT64 s;
1653  static C_INT ip1, nm1;
1654 
1655  /* ...SORTS THE ELEMENTS OF D(N) INTO DESCENDING ORDER AND MOVES THE */
1656  /* CORRESPONDING COLUMNS OF V(N,N). */
1657  /* M IS THE ROW DIMENSION OF V AS DECLARED IN THE CALLING PROGRAM. */
1658  /* Parameter adjustments */
1659  v_dim1 = *m;
1660  v_offset = v_dim1 + 1;
1661  v -= v_offset;
1662  --d__;
1663 
1664  /* Function Body */
1665  if (*n == 1)
1666  {
1667  return 0;
1668  }
1669 
1670  nm1 = *n - 1;
1671  i__1 = nm1;
1672 
1673  for (i__ = 1; i__ <= i__1; ++i__)
1674  {
1675  k = i__;
1676  s = d__[i__];
1677  ip1 = i__ + 1;
1678  i__2 = *n;
1679 
1680  for (j = ip1; j <= i__2; ++j)
1681  {
1682  if (d__[j] <= s)
1683  {
1684  goto L1;
1685  }
1686 
1687  k = j;
1688  s = d__[j];
1689 L1:
1690  ;
1691  }
1692 
1693  if (k <= i__)
1694  {
1695  goto L3;
1696  }
1697 
1698  d__[k] = d__[i__];
1699  d__[i__] = s;
1700  i__2 = *n;
1701 
1702  for (j = 1; j <= i__2; ++j)
1703  {
1704  s = v[j + i__ * v_dim1];
1705  v[j + i__ * v_dim1] = v[j + k * v_dim1];
1706  /* L2: */
1707  v[j + k * v_dim1] = s;
1708  }
1709 
1710 L3:
1711  ;
1712  }
1713 
1714  return 0;
1715 } /* sort_ */
#define C_INT
Definition: copasi.h:115
#define C_FLOAT64
Definition: copasi.h:92
int vcprnt_ ( C_INT option,
C_FLOAT64 v,
C_INT n 
)

Definition at line 1787 of file CPraxis.cpp.

References C_INT.

Referenced by CPraxis::praxis_().

1788 {
1789  /* System generated locals */
1790  C_INT i__1;
1791 
1792  /* Local variables */
1793  C_INT i;
1794 
1795  /* Parameter adjustments */
1796  --v;
1797 
1798  /* Function Body */
1799  switch ((int)*option)
1800  {
1801  case 1: goto L1;
1802  case 2: goto L2;
1803  case 3: goto L3;
1804  case 4: goto L4;
1805  }
1806 
1807 L1:
1808  printf("THE SECOND DIFFERENCE ARRAY D[*] IS :\n");
1809  i__1 = *n;
1810 
1811  for (i = 1; i <= i__1; ++i)
1812  {
1813  printf("%g\n", v[i]);
1814  }
1815 
1816  return 0;
1817 L2:
1818  printf("THE SCALE FACTORS ARE:\n");
1819  i__1 = *n;
1820 
1821  for (i = 1; i <= i__1; ++i)
1822  {
1823  printf("%g\n", v[i]);
1824  }
1825 
1826  return 0;
1827 L3:
1828  printf("THE APPROXIMATING QUADRATIC FORM HAS THE PRINCEPAL VALUES:\n");
1829  i__1 = *n;
1830 
1831  for (i = 1; i <= i__1; ++i)
1832  {
1833  printf("%g\n", v[i]);
1834  }
1835 
1836  return 0;
1837 L4:
1838  printf("x is:\n");
1839  i__1 = *n;
1840 
1841  for (i = 1; i <= i__1; ++i)
1842  {
1843  printf("%g\n", v[i]);
1844  }
1845 
1846  return 0;
1847 } /* vcprnt_ */
#define C_INT
Definition: copasi.h:115

Variable Documentation

C_INT c__0 = 0
static

Definition at line 56 of file CPraxis.cpp.

Referenced by CPraxis::quad_().

C_INT c__1 = 1
static

Definition at line 50 of file CPraxis.cpp.

Referenced by CPraxis::praxis_().

C_INT c__2 = 2
static

Definition at line 51 of file CPraxis.cpp.

Referenced by CPraxis::praxis_(), and CPraxis::quad_().

C_INT c__3 = 3
static

Definition at line 55 of file CPraxis.cpp.

Referenced by CPraxis::praxis_().

C_INT c__4 = 4
static

Definition at line 53 of file CPraxis.cpp.

Referenced by CPraxis::praxis_().

bool c_false = (0)
static

Definition at line 52 of file CPraxis.cpp.

Referenced by CPraxis::praxis_().

bool c_true = (1)
static

Definition at line 54 of file CPraxis.cpp.

Referenced by CPraxis::praxis_(), and CPraxis::quad_().