src/cmr/series_parallel.c
/**< Static buffer for \ref CMRspString. */
< Static buffer for \ref CMRspString.
< Static buffer for \ ref CMRspString .
char* CMRspReductionString(CMR_SP_REDUCTION reduction, char* buffer)
{
  if (!buffer)
    buffer = seriesParallelStringBuffer;
  if (reduction.element > 0)
  {
    if (reduction.mate > 0)
      sprintf(buffer, "c%d copy of c%d", reduction.element, reduction.mate);
    else if (reduction.mate < 0)
      sprintf(buffer, "c%d unit at r%d", reduction.element, -reduction.mate);
    else
      sprintf(buffer, "c%d zero", reduction.element);
    return buffer;
  }
  else if (reduction.element < 0)
  {
    if (reduction.mate > 0)
      sprintf(buffer, "r%d unit at c%d", -reduction.element, reduction.mate);
    else if (reduction.mate < 0)
      sprintf(buffer, "r%d copy of r%d", -reduction.element, -reduction.mate);
    else
      sprintf(buffer, "r%d zero", -reduction.element);
    return buffer;
  }
  else
    return "<invalid series-parallel reduction>";
}
char * CMRspReductionString ( CMR_SP_REDUCTION reduction , char * buffer ) { if ( ! buffer ) buffer = seriesParallelStringBuffer ; if ( reduction . element > 0 ) { if ( reduction . mate > 0 ) sprintf ( buffer , " " , reduction . element , reduction . mate ) ; else if ( reduction . mate < 0 ) sprintf ( buffer , " " , reduction . element , - reduction . mate ) ; else sprintf ( buffer , " " , reduction . element ) ; return buffer ; } else if ( reduction . element < 0 ) { if ( reduction . mate > 0 ) sprintf ( buffer , " " , - reduction . element , reduction . mate ) ; else if ( reduction . mate < 0 ) sprintf ( buffer , " " , - reduction . element , - reduction . mate ) ; else sprintf ( buffer , " " , - reduction . element ) ; return buffer ; } else return " " ; }
< Static buffer for \ref CMRspString.
< Static buffer for \ ref CMRspString .