IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2008, 11:13:15 AM (18 years ago)
Author:
eugene
Message:

allow functions to use FLT or INT vectors as appropriate; document valid types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081124/Ohana/src/opihi/cmd.data/fit.c

    r20839 r20859  
    5353    return (FALSE);
    5454  }
    55   if (Weight && xvec[0].Nelements != dyvec[0].Nelements) {
    56     gprint (GP_ERR, "vectors must have same length\n");
    57     return (FALSE);
    58   }
    59  
     55  REQUIRE_VECTOR_FLT (xvec, FALSE);
     56  REQUIRE_VECTOR_FLT (yvec, FALSE);
     57
     58  if (Weight) {
     59    REQUIRE_VECTOR_FLT (dyvec, FALSE);
     60    if (xvec[0].Nelements != dyvec[0].Nelements) {
     61      gprint (GP_ERR, "vectors must have same length\n");
     62      return (FALSE);
     63    }
     64  }
     65 
     66
    6067  /* nterm is number of polynomial terms, starting at x^0 */
    6168  order = atof (argv[3]);
Note: See TracChangeset for help on using the changeset viewer.