41 #if defined __cplusplus
103 while( isspace( *e ) ) e++;
105 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"2d_xindex_y contains extra data = %s", e );
109 if( status != 0 ) release( smr, xDT );
120 char *str, *
p, fmt[32] =
" %99d %15.7e\n";
124 for( i = 0; i <
n; i++, data++ ) {
125 while( ( data->
index > indexMax ) && ( indexMax > 0 ) ) {
126 indexMax = 10 * indexMax + 9;
131 sprintf( fmt,
" %%%dld %%15.7e\n", iFmt );
132 if( ( str = (
char *) malloc( recordSize * ( n + 1 ) ) ) == NULL )
return( NULL );
158 if( xDT->
length == 0 )
return( NULL );
161 for( i = 0; i < xDT->
length; i++ ) {
163 index += data[i].
index;
184 double *values = NULL, *
p;
187 if( xDT->
length == 0 )
return( NULL );
189 if( ( values = (
double*)
xData_malloc2( smr, 2 * xDT->
length *
sizeof(
double ), 0,
"values" ) ) == NULL )
return( NULL );
191 for( i = 0; i < xDT->
length; i++, p++ ) {
192 index += data[i].
index;
204 return( xData_2d_xindex_y_toFilled( smr, element, Xs, 1 ) );
219 return( xData_2d_xindex_y_toFilled( smr, element, Xs, 2 ) );
230 double x1,
x2, *
x,
y1,
y2, *values = NULL, *
p;
233 if( xDT->
length == 0 )
return( NULL );
235 if( ( values = (
double*)
xData_malloc2( smr, size * length *
sizeof(
double ), 0,
"values" ) ) == NULL )
return( NULL );
237 x = &(Xs[xDT->
start]);
240 for( i = 0; i < xDT->
length; i++, x++, p++ ) {
241 index += data[i].
index;
246 for( j = data[i].index; j > 1; j--, x++, p++ ) {
251 *p = ( y1 * ( x2 - *
x ) + y2 * ( *x - x1 ) ) / ( x2 - x1 );
253 if( size == 2 ) *(p++) = *x;
259 #if defined __cplusplus