Index Page
wncard_c
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Procedure
Abstract
Required_Reading
Keywords
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version
Index_Entries

Procedure

   SpiceInt wncard_c ( SpiceCell  * window ) 

Abstract

 
   Return the cardinality (number of intervals) of a double
   precision window.
 

Required_Reading

 
   WINDOWS
 

Keywords

 
   WINDOWS
 

Brief_I/O

 
   VARIABLE  I/O  DESCRIPTION 
   --------  ---  -------------------------------------------------- 
   window     I   Input window 
 
   The function returns the window cardinality of the window. 
 

Detailed_Input

  
   window      a window containing zero or more intervals

               'window' must be declared as a double precision SpiceCell.
 

Detailed_Output

 
   The function returns the cardinality of (number of intervals in)
   the input window.
 

Parameters

 
   None. 
 

Exceptions

 
   None.

Files

 
   None. 
 

Particulars

 
   This function returns the value of card_c(window)/2.
 

Examples

      /. Include needed headers. ./

      #include <stdio.h>
      #include "SpiceUsr.h"

      #define WNSIZE          10
   
   int main()
      {


      SpiceInt                 i;
      SpiceDouble              left;
      SpiceDouble              right;
   
      SPICEDOUBLE_CELL ( window,  WNSIZE );

      wnvald_c ( WNSIZE, 0, &window );

      wninsd_c (  1.0,   3.0, &window );
      wninsd_c (  7.0,  11.0, &window );
      wninsd_c ( 23.0,  27.0, &window );
   
      for ( i=0; i<wncard_c(&window); i++)
         {
         wnfetd_c( &window, i, &left, &right );
         printf("Interval %d [%f, %f]\n", i, left, right );
         }
   
      return ( 0 );
      }
      
   The code outputs:
   
      Interval 0 [1.000000 ,  3.000000]
      Interval 1 [7.000000 , 11.000000]
      Interval 2 [23.000000, 27.000000]

Restrictions

 
   None. 
 

Literature_References

 
   None. 
 

Author_and_Institution

 
   E.D. Wright    (JPL) 
 

Version

 
   -CSPICE Version 1.0.0, 21-AUG-2007 (EDW)

Index_Entries

 
   cardinality of a d.p. window
 
Wed Apr  5 17:54:47 2017