Functions

vector.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <clan/vector.h>
Include dependency graph for vector.c:

Functions

scoplib_vector_p clan_vector_term (clan_symbol_p symbol, int coefficient, char *identifier)

Function Documentation

scoplib_vector_p clan_vector_term ( clan_symbol_p  symbol,
int  coefficient,
char *  identifier 
)

clan_vector_term function: This function generates the vector representation of a term. It allocates a vector with maximal size and put the term value at the right place depending if the term is a constant, an iterator coefficient or a parameter coefficient (see the structure of a PolyLib row if unsure!).

Parameters:
symbol The first node of the list of symbols.
coefficient The constant or coefficient.
identifier Identifier of iterator or parameter (NULL for constant).
  • 01/05/2008: first version.

References CLAN_MAX_DEPTH, CLAN_MAX_PARAMETERS, clan_symbol_get_rank(), clan_symbol_get_type(), and clan_symbol::rank.

Referenced by yyparse().