/* tmetpr.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Test: metpr Uses: vmul dotp matprt Input file: metp.dat */ #include "ccmath.h" char fmt[]=" %8.4f"; void main(int na,char **av) { double s,*a,*u,*v; int i,n,m; FILE *fp; if(na!=2){ printf("para: input_file\n"); exit(-1);} fp=fopen(*++av,"r"); fscanf(fp,"%d",&n); m=n*n; printf(" Metric Product Test: dimension= %d\n",n); a=(double *)calloc(m+2*n,sizeof(double)); u=a+m; v=u+n; for(i=0; i