FAUST compiler  0.9.9.6b8
Functions
recSchema.cpp File Reference
#include "recSchema.h"
#include <iostream>
#include <assert.h>
Include dependency graph for recSchema.cpp:

Go to the source code of this file.

Functions

schemamakeRecSchema (schema *s1, schema *s2)
 Creates a new recursive schema (s1 ~ s2). More...
 

Function Documentation

schema* makeRecSchema ( schema s1,
schema s2 
)

Creates a new recursive schema (s1 ~ s2).

The smallest component is enlarged to the width of the other. The left and right horizontal margins are computed according to the number of internal connections.

Definition at line 34 of file recSchema.cpp.

References dWire, makeEnlargedSchema(), max(), and schema::width().

Referenced by generateInsideSchema().

35 {
36  schema* a = makeEnlargedSchema(s1, s2->width());
37  schema* b = makeEnlargedSchema(s2, s1->width());
38  double m = dWire * max(b->inputs(), b->outputs());
39  double w = a->width() + 2*m;
40 
41  return new recSchema(a,b,w);
42 }
const double dWire
distance between two wires
Definition: schema.h:33
double max(double x, double y)
Definition: interval.hh:60
double width() const
Definition: schema.h:126
An abstract block diagram schema.
Definition: schema.h:97
place and connect two diagrams in recursive composition
Definition: recSchema.h:33
schema * makeEnlargedSchema(schema *s, double width)
Returns an enlarged schema, but only if really needed that is if the requiered width is greater that ...

Here is the call graph for this function:

Here is the caller graph for this function: