Atan2Prim Class Reference

Inherits xtended.

Collaboration diagram for Atan2Prim:
[legend]

List of all members.

Public Member Functions

 Atan2Prim ()
virtual unsigned int arity ()
virtual bool needCache ()
virtual Type infereSigType (const vector< Type > &args)
virtual void sigVisit (Tree sig, sigvisitor *visitor)
virtual int infereSigOrder (const vector< int > &args)
virtual Tree computeSigOutput (const vector< Tree > &args)
virtual string generateCode (Klass *klass, const vector< string > &args, const vector< Type > &types)
virtual string generateLateq (Lateq *lateq, const vector< string > &args, const vector< Type > &types)

Detailed Description

Definition at line 7 of file atan2prim.cpp.


Constructor & Destructor Documentation

Atan2Prim::Atan2Prim (  )  [inline]

Definition at line 12 of file atan2prim.cpp.

00012 : xtended("atan2") {}


Member Function Documentation

virtual unsigned int Atan2Prim::arity (  )  [inline, virtual]

Implements xtended.

Definition at line 14 of file atan2prim.cpp.

Referenced by generateCode(), and generateLateq().

00014 { return 2; }

Here is the caller graph for this function:

virtual Tree Atan2Prim::computeSigOutput ( const vector< Tree > &  args  )  [inline, virtual]

Implements xtended.

Definition at line 31 of file atan2prim.cpp.

References isNum(), xtended::symbol(), and tree().

00032     {
00033         assert (args.size() == 2);
00034         num n,m;
00035         if (isNum(args[0],n) && isNum(args[1],m)) {
00036             return tree(atan2(double(n), double(m)));
00037         } else {
00038             return tree(symbol(), args[0], args[1]);
00039         }
00040     }

Here is the call graph for this function:

virtual string Atan2Prim::generateCode ( Klass klass,
const vector< string > &  args,
const vector< Type > &  types 
) [inline, virtual]

Implements xtended.

Definition at line 42 of file atan2prim.cpp.

References arity(), isuffix(), and subst().

00043     {
00044         assert (args.size() == arity());
00045         assert (types.size() == arity());
00046         
00047         return subst("atan2$2($0,$1)", args[0], args[1], isuffix());
00048     }

Here is the call graph for this function:

virtual string Atan2Prim::generateLateq ( Lateq lateq,
const vector< string > &  args,
const vector< Type > &  types 
) [inline, virtual]

Implements xtended.

Definition at line 50 of file atan2prim.cpp.

References arity(), and subst().

00051     {
00052         assert (args.size() == arity());
00053         assert (types.size() == arity());
00054         
00055         return subst("\\arctan\\frac{$0}{$1}", args[0], args[1]);
00056     }

Here is the call graph for this function:

virtual int Atan2Prim::infereSigOrder ( const vector< int > &  args  )  [inline, virtual]

Implements xtended.

Definition at line 26 of file atan2prim.cpp.

References max().

00026                                                          {
00027         return max(args[0], args[1]);
00028     }

Here is the call graph for this function:

virtual Type Atan2Prim::infereSigType ( const vector< Type > &  args  )  [inline, virtual]

Implements xtended.

Definition at line 18 of file atan2prim.cpp.

References floatCast().

00019     {
00020         assert (args.size() == 2);
00021         return floatCast(args[0]|args[1]);
00022     }

Here is the call graph for this function:

virtual bool Atan2Prim::needCache (  )  [inline, virtual]

Implements xtended.

Definition at line 16 of file atan2prim.cpp.

00016 { return true; }

virtual void Atan2Prim::sigVisit ( Tree  sig,
sigvisitor visitor 
) [inline, virtual]

Definition at line 24 of file atan2prim.cpp.

00024 {}  


The documentation for this class was generated from the following file:
Generated on Thu Apr 29 00:00:17 2010 for FAUST compiler by  doxygen 1.6.3