Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

hybrid.cc

Go to the documentation of this file.
00001 // hybrid.cc
00002 // SuperMix version 1.0  C++ source file
00003 //
00004 // Copyright (c) 1999 California Institute of Technology.
00005 // All rights reserved.
00006 //
00007 // Redistribution and use in source and binary forms for noncommercial
00008 // purposes are permitted provided that the above copyright notice and
00009 // this paragraph are duplicated in all such forms and that any
00010 // documentation and other materials related to such distribution and
00011 // use acknowledge that the software was developed by California
00012 // Institute of Technology. Redistribution and/or use in source or
00013 // binary forms is not permitted for any commercial purpose. Use of
00014 // this software does not include a permitted use of the Institute's
00015 // name or trademark for any purpose.
00016 //
00017 // DISCLAIMER:
00018 // THIS SOFTWARE AND/OR RELATED MATERIALS ARE PROVIDED "AS-IS" WITHOUT
00019 // WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR
00020 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET
00021 // FORTH IN UCC 23212-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
00022 // LICENSED PRODUCT, HOWEVER USED.  IN NO EVENT SHALL CALTECH/JPL BE
00023 // LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING BUT NOT LIMITED TO
00024 // INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING ECONOMIC
00025 // DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF
00026 // WHETHER CALTECH/JPL SHALL BE ADVISED, HAVE REASON TO KNOW, OR IN
00027 // FACT SHALL KNOW OF THE POSSIBILITY.  THE USER BEARS ALL RISK
00028 // RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND/OR RELATED
00029 // MATERIALS.
00030 //
00031 // Change history:
00032 // 11/11/98: Changed table access to new syntax
00033 
00034 #include "hybrid.h"
00035 #include <math.h>
00036 
00037 hybrid90::hybrid90() : nport(4)
00038 {
00039   double norm = -1.0 / sqrt(2.0);
00040   
00041   // Perfect input matches.
00042   data.S[1][1] = 0.0;
00043   data.S[2][2] = 0.0;
00044   data.S[3][3] = 0.0;
00045   data.S[4][4] = 0.0;
00046 
00047   data.S[1][4] = 0.0;
00048   data.S[4][1] = 0.0;
00049   data.S[2][3] = 0.0;
00050   data.S[3][2] = 0.0;
00051 
00052   data.S[3][1] = norm;
00053   data.S[1][3] = norm;
00054   data.S[2][4] = norm;
00055   data.S[4][2] = norm;
00056 
00057   data.S[1][2] = I*norm;
00058   data.S[2][1] = I*norm;
00059   data.S[3][4] = I*norm;
00060   data.S[4][3] = I*norm;
00061 
00062   // Ideal hybrid is lossless, so noise correlation matrix, C, is 0.
00063   // Assume source vector, B, is already 0.
00064   info.noise = info.active = info.source = false;
00065 }
00066 
00067 hybrid180::hybrid180() : nport(4)
00068 {
00069   complex norm = I / sqrt(2.0);
00070   
00071   // Perfect input matches.
00072   data.S[1][1] = 0.0;
00073   data.S[2][2] = 0.0;
00074   data.S[3][3] = 0.0;
00075   data.S[4][4] = 0.0;
00076 
00077   data.S[1][4] = 0.0;
00078   data.S[4][1] = 0.0;
00079   data.S[2][3] = 0.0;
00080   data.S[3][2] = 0.0;
00081 
00082   data.S[3][1] = norm;
00083   data.S[1][3] = norm;
00084   data.S[2][4] = norm;
00085   data.S[4][2] = norm;
00086 
00087   data.S[1][2] = -norm;
00088   data.S[2][1] = -norm;
00089   data.S[3][4] = -norm;
00090   data.S[4][3] = -norm;
00091 
00092   // Ideal hybrid is lossless, so noise correlation matrix, C, is 0.
00093   // Assume source vector, B, is already 0.
00094   info.noise = info.active = info.source = false;
00095 }

Please direct comments and corrections to supermix@submm.caltech.edu
Go to the supermix home page
Generated by doxygen1.2.7