#include <assert.h>
#include <stdlib.h>
#include "recursivness.hh"
#include "occurences.hh"
#include "sigtype.hh"
#include "sigtyperules.hh"
#include <iostream>
Go to the source code of this file.
Functions | |
static int | xVariability (int v, int r) |
Extended Variability with recursiveness indication. | |
static int | position (Tree env, Tree t, int p) |
return the position of a signal in the current recursive environment |
return the position of a signal in the current recursive environment
env | the current recursive environment of the signal | |
t | signal we want to know the position |
Definition at line 168 of file occurences.cpp.
References hd(), isNil(), and tl().
00169 { 00170 if (isNil(env)) return 0; // was not in the environment 00171 if (hd(env) == t) return p; 00172 else return position (tl(env), t, p+1); 00173 }
static int xVariability | ( | int | v, | |
int | r | |||
) | [static] |
Extended Variability with recursiveness indication.
Definition at line 14 of file occurences.cpp.
References min().
Referenced by Occurences::incOccurences().
00015 { 00016 //cerr << "xVariability (" << v << ", " << r << ")" << endl; 00017 //assert (v < 3); // kKonst=0, kBlock=1, kSamp=2 00018 //assert(r==0 | v==2); 00019 if (r>1) r=1; 00020 return min(3, v + r); 00021 }