aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/vasp/source/ops_carith.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2009-04-01 21:13:09 +0000
committerThomas Grill <xovo@users.sourceforge.net>2009-04-01 21:13:09 +0000
commit0ed7a8b68dd73e2b0473b8127aeca99f3bac9061 (patch)
tree5c67818b38a5cc2f9caa5ca7f8640ca356adf02b /externals/grill/vasp/source/ops_carith.cpp
parentbb4c7f6a245394d09dac9adfb2efb093d3d98452 (diff)
cleaned up grill externals - replaced with svn:externals to svn.grrrr.org/ext/trunk/
svn path=/trunk/; revision=10951
Diffstat (limited to 'externals/grill/vasp/source/ops_carith.cpp')
-rw-r--r--externals/grill/vasp/source/ops_carith.cpp82
1 files changed, 0 insertions, 82 deletions
diff --git a/externals/grill/vasp/source/ops_carith.cpp b/externals/grill/vasp/source/ops_carith.cpp
deleted file mode 100644
index 5a964cca..00000000
--- a/externals/grill/vasp/source/ops_carith.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-
-VASP modular - vector assembling signal processor / objects for Max/MSP and PD
-
-Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
-For information on usage and redistribution, and for a DISCLAIMER OF ALL
-WARRANTIES, see the file, "license.txt," in this distribution.
-
-*/
-
-#include "main.h"
-#include "ops_carith.h"
-#include "ops_assign.h"
-#include "opdefs.h"
-#include "util.h"
-#include <math.h>
-
-
-VASP_BINARY("vasp.c+",cadd,true,VASP_ARG_R(0),"adds a complex value or vasp")
-VASP_BINARY("vasp.c-",csub,true,VASP_ARG_R(0),"subtracts a complex value or vasp")
-VASP_BINARY("vasp.c!-",csubr,true,VASP_ARG_R(0),"reverse subtracts a complex value or vasp")
-VASP_BINARY("vasp.c*",cmul,true,VASP_ARG_R(1),"multiplies by a complex value or vasp")
-VASP_BINARY("vasp.c/",cdiv,true,VASP_ARG_R(1),"divides by a complex value or vasp")
-VASP_BINARY("vasp.c!/",cdivr,true,VASP_ARG_R(1),"reverse divides by a complex value or vasp")
-
-
-// -----------------------------------------------------
-
-
-VASP_UNARY("vasp.csqr",csqr,true,"complex square")
-
-// -----------------------------------------------------
-
-Vasp *VaspOp::m_cpowi(OpParam &p,CVasp &src,const Argument &arg,CVasp *dst)
-{
- Vasp *ret = NULL;
- CVecBlock *vecs = GetCVecs(p.opname,src,dst);
- if(vecs) {
- I powi = 1;
- if(arg.IsList() && arg.GetList().Count() >= 1 && flext::CanbeInt(arg.GetList()[0]))
- powi = flext::GetAInt(arg.GetList()[0]);
- else
- post("%s - power arg is invalid -> set to 1",p.opname);
-
- if(powi < 0) {
- post("%s - negative integer power is not allowed",p.opname);
- }
- else {
- switch(powi) {
- case 0: {
- p.cbin.rarg = 1,p.cbin.iarg = 0;
- ret = DoOp(vecs,VecOp::d_cset,p);
- break;
- }
- case 1: {
- // set arg to src
- ret = DoOp(vecs,VecOp::d_ccopy,p);
- break;
- }
- case 2: {
- ret = DoOp(vecs,VecOp::d_csqr,p);
- break;
- }
- default: {
- p.ibin.arg = powi;
- ret = DoOp(vecs,VecOp::d_cpowi,p);
- break;
- }
- }
- }
-
- delete vecs;
- }
- return ret;
-}
-
-VASP_ANYOP("vasp.cpowi",cpowi,0,true,VASP_ARG_I(1),"complex integer power")
-
-// -----------------------------------------------------
-
-VASP_UNARY("vasp.cabs",cabs,true,"set real part to complex absolute value, imaginary part becomes zero")
-