亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mp_molecule.c

?? LastWave
?? C
字號(hào):
/*..........................................................................*//*                                                                          *//*      L a s t W a v e    P a c k a g e 'mp' 2.1                           *//*                                                                          *//*      Copyright (C) 2000 Remi Gribonval, Emmanuel Bacry and Javier Abadia.*//*      email  : remi.gribonval@inria.fr                                    *//*      email  : lastwave@cmap.polytechnique.fr                             *//*                                                                          *//*..........................................................................*//*                                                                          *//*      This program is a free software, you can redistribute it and/or     *//*      modify it under the terms of the GNU General Public License as      *//*      published by the Free Software Foundation; either version 2 of the  *//*      License, or (at your option) any later version                      *//*                                                                          *//*      This program is distributed in the hope that it will be useful,     *//*      but WITHOUT ANY WARRANTY; without even the implied warranty of      *//*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *//*      GNU General Public License for more details.                        *//*                                                                          *//*      You should have received a copy of the GNU General Public License   *//*      along with this program (in a file named COPYRIGHT);                *//*      if not, write to the Free Software Foundation, Inc.,                *//*      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA             *//*                                                                          *//*..........................................................................*/#include "lastwave.h"#include "mp_book.h"#include "int_fsilist.h"/**********************************//* * 	MOLECULE VARIABLES *//**********************************/char *moleculeType = "&mol";/* * Answers to the different print messages */ void ShortPrintMolecule(MOLECULE molecule){  Printf("<&mol[%d][%d];%p>\n",molecule->dim,molecule->nChannels,molecule);}char *ToStrMolecule(MOLECULE molecule, char flagShort){  static char str[30];    sprintf(str,"<&mol;%p>",molecule);  return(str);}void PrintInfoMolecule(MOLECULE molecule){  PrintMolecule(molecule,NO);}MOLECULE TNewMolecule(void){  MOLECULE molecule;    molecule = NewMolecule();  TempValue(molecule);  return(molecule);}/* ALLOCATION */static void InitMolecule(MOLECULE molecule){  if (molecule == NULL) Errorf("NULL argument for InitMolecule!");    molecule->dim		= 0;  molecule->nChannels	= 1;  molecule->sizeAlloc	= 0;  molecule->atoms	= NULL;  molecule->coeff2      = 0.0;  }MOLECULE NewMolecule(void){  MOLECULE molecule;  #ifdef DEBUGALLOC  DebugType = "Molecule";#endif    molecule = (MOLECULE) Malloc(sizeof(Molecule));  InitValue(molecule,&tsMolecule);  InitMolecule(molecule);  return(molecule);}MOLECULE DeleteMolecule(MOLECULE molecule){  unsigned int i;  if (molecule == NULL)  Errorf("NULL argument for DeleteMolecule!");  if (molecule->nRef==0) Errorf("*** Danger : trying to delete a temporary molecule\n");  RemoveRefValue(molecule);  if(molecule->nRef > 0) return(NULL);    if(molecule->atoms) {    for(i = 0; i < molecule->dim*molecule->nChannels; i++) {      if(molecule->atoms[i])	molecule->atoms[i] = DeleteAtom(molecule->atoms[i]);    }    Free(molecule->atoms);    molecule->atoms = NULL;  }  #ifdef DEBUGALLOC  DebugType = "Molecule";#endif    Free(molecule);  return(NULL);}void ClearMolecule(MOLECULE molecule){  unsigned int i;  if (molecule == NULL) Errorf("NULL argument for ClearMolecule!");    if(molecule->atoms) {    for(i = 0; i < molecule->dim*molecule->nChannels; i++) {      if(molecule->atoms[i])	molecule->atoms[i] = DeleteAtom(molecule->atoms[i]);    }    molecule->dim = 0; // Note that we do NOT delete the array    molecule->nChannels = 1;  }  molecule->coeff2 = 0.0;}// If 'sizeAlloc' is smaller than molecule->dim*molecule->nChannels, an error is generated.// Else the allocation size of the array of atoms is adjusted to 'sizeAlloc'.// -the newly allocated part of the array is initialized to NULL atoms;// -the previously allocated part is kept (molecule->dim and molecule->nChannels are not changed)void SizeMolecule(MOLECULE molecule,unsigned int sizeAlloc){  unsigned int i;  if(sizeAlloc<molecule->dim*molecule->nChannels)     Errorf("SizeMolecule : cannot (re)allocate less than the number of atoms");  if(sizeAlloc==molecule->dim*molecule->nChannels) return;  // Case of a first allocation  if(molecule->sizeAlloc == 0) {    molecule->atoms    = (ATOM*) Calloc(sizeAlloc,sizeof(ATOM));    molecule->sizeAlloc = sizeAlloc;  }  // Case of a resize  else {    molecule->atoms          = (ATOM*) Realloc(molecule->atoms,sizeAlloc*sizeof(ATOM));    // Initialize the newly allocated data, if necessary    for(i = molecule->sizeAlloc; i < sizeAlloc; i++)       molecule->atoms[i] = NULL;    molecule->sizeAlloc = sizeAlloc;  }}/* METHODS */void CheckMoleculeNotEmpty(const MOLECULE molecule){  if(molecule == NULL)           Errorf("CheckMoleculeNotEmpty : NULL molecule");  if(molecule->dim == 0)         Errorf("CheckMoleculeNotEmpty : molecule is of dimension 0");  if(molecule->atoms[0] == NULL) Errorf("CheckMoleculeNotEmpty : first atom is NULL");}// Get the <k>th atom of a <channel> in a molecule. // Generates an error if <k> is bigger than molecule->dim or <channel> larger than molecule->nChannelsATOM   GetMoleculeAtom(const MOLECULE molecule,unsigned char channel,unsigned short k){  ATOM atom;  CheckMoleculeNotEmpty(molecule);  if(k>=molecule->dim)             Errorf("GetMoleculeAtom : atom number %d does not exist in this molecule",k);  if(channel>=molecule->nChannels) Errorf("GetMoleculeAtom : channel number %d does not exist in this molecule",channel);  /* Atoms are stacked as [k=0,channel=0][k=1,channel=0]...[k=dim-1,channel=0][k=0,channel=2]... */  atom = molecule->atoms[channel*molecule->dim+k];  if(atom==NULL) Errorf("GetMoleculeAtom : (Weired) atom number %d in channel %d is NULL",k,channel);  return(atom);}// Adds an atom to a MONOCHANNEL molecule, and increases the molecule->dim. // If the molecule is not monochannel, an error is generated. The allocation size in the molecule// is automatically managed, and an error is generated if the atom 'TFContent' does not// match that of those previously contained in the molecule.void AddAtom2Molecule(MOLECULE molecule,ATOM atom){  ATOM firstAtom = NULL;  // Checking the inputs  if(molecule->nChannels>1)  Errorf("AddAtom2Molecule : molecule should be monochannel!");  if(molecule->dim>0) {    firstAtom = GetMoleculeAtom(molecule,0,0);    CheckTFContentCompat(firstAtom,atom);  }  // Case where we have to resize the molecule  if(molecule->sizeAlloc == molecule->dim) {    if(molecule->sizeAlloc==0) SizeMolecule(molecule,MP_DEFAULT_MOLECULE_SIZE);    else SizeMolecule(molecule,2*molecule->sizeAlloc);   }  molecule->atoms[molecule->dim] = atom;  molecule->dim++;  molecule->coeff2 += atom->coeff2;}// Adds a new channel (the atoms of a monochannel molecule) to a molecule, and increases the molecule->nChannels. // If the added molecule is not monochannel, or the molecule is empty, an error is generated.// An error is also generated if the channel 'TFContent' or 'dim' does not match that of the molecule.// The allocation size in the molecule is automatically managed.// WARNING : the atoms of the channel are not copied, a REFERENCE is added, // so the channel should rather be deleted than modified void AddChannel2Molecule(MOLECULE molecule,MOLECULE channelMol){  unsigned short k;  ATOM atom = NULL;  /* Checking the input */  if(channelMol->nChannels>1)      Errorf("AddChannel2Molecule : added 'channel' should be monochannel!");  CheckMoleculeNotEmpty(molecule);  if(molecule->dim!=channelMol->dim)     Errorf("AddChannel2Molecule : added channel and molecule should have the same dimension %d",molecule->dim);  CheckTFContentCompat(GetMoleculeAtom(molecule,0,0),GetMoleculeAtom(channelMol,0,0));  // Case where we have to resize the molecule  if(molecule->sizeAlloc < molecule->dim*(molecule->nChannels+1)) {    SizeMolecule(molecule,molecule->dim*(molecule->nChannels+1));   }    for(k = 0; k < molecule->dim; k++) {    atom = GetMoleculeAtom(channelMol,0,k);    molecule->atoms[molecule->nChannels*molecule->dim+k] = atom;    AddRefValue(atom);    molecule->coeff2 += atom->coeff2;  }  molecule->nChannels++;}MOLECULE CopyMolecule(const MOLECULE in,MOLECULE out) {  unsigned int i;  ATOM atom;  if(in == NULL)  return(NULL);  if(out == NULL) out = NewMolecule();  if(in == out)   return(out);  CheckMoleculeNotEmpty(in);  ClearMolecule(out);  SizeMolecule(out,in->dim*in->nChannels);  for(i = 0; i < in->dim*in->nChannels; i++) {    out->atoms[i] = CopyAtom(in->atoms[i],out->atoms[i]);  }  out->dim        = in->dim;  out->nChannels  = in->nChannels;  out->coeff2 	  = in->coeff2;  return(out);}MOLECULE CopyMoleculeChannel(const MOLECULE in,unsigned char channel,MOLECULE out) {  unsigned short k;  ATOM atom;  if(in == NULL)  return(NULL);  CheckMoleculeNotEmpty(in);  if(channel>=in->nChannels) Errorf("CopyMoleculeChannel : channel %d is too big",channel);  if(out == NULL) out = NewMolecule();  if(in == out)   return(out);    ClearMolecule(out);  /* Output is monochannel */  SizeMolecule(out,in->dim);  for(k = 0; k < in->dim; k++) {    atom = GetMoleculeAtom(in,channel,k);    AddAtom2Molecule(out,CopyAtom(atom,NULL));  }  return(out);}void PrintMolecule(const MOLECULE molecule,char flagShort){  unsigned short k;  unsigned char channel;  ATOM atom;    CheckMoleculeNotEmpty(molecule);    // Short display of a molecule (e.g., during the pursuit)  if(flagShort) {    atom = GetMoleculeAtom(molecule,0,0);    // Case of a molecule containing only one Gabor atom    if(molecule->dim == 1) PrintAtom(atom,YES);    // Case of a molecule containing a harmonic atom    else {      Printf("totalCoeff2 %g (s,t,f0,c) = (%d,%g,%g,%g)\n",	     molecule->coeff2,atom->windowSize,	     TimeId2Time(atom,atom->timeId),FreqId2Freq(atom,atom->freqId),ChirpId2Chirp(atom,atom->chirpId));      Printf("   dim %d coeff2",molecule->dim);      for(k = 0; k < molecule->dim; k++) {	atom = GetMoleculeAtom(molecule,0,k);	Printf("[%g]",atom->coeff2);      }      Printf("\n");    }  }  else {    Printf("Coeff2   : %g    (%g)\n",molecule->coeff2,sqrt(molecule->coeff2));    for(k = 0; k < molecule->dim; k++) {      atom = GetMoleculeAtom(molecule,0,k);      if(molecule->dim>1) Printf("--%d\n",k);      PrintAtom(atom,NO);    }  }}/* * The fields of a &mol */static char *dimDoc = "{} {Returns the number of atoms in the &mol}";static char *coeff2Doc = "{} {Returns the coeff2 of the &mol (it is the sum of those of its atoms)}";void *GetDimMoleculeV(MOLECULE molecule, void **arg){  /* Documentation */  if (molecule == NULL) return(dimDoc);  return(GetIntField(molecule->dim,arg));}static void *GetOptionsMoleculeV(MOLECULE molecule, void **arg){  static char *opt[] = {NULL};  return(opt);}static void *GetExtractInfoMoleculeV(MOLECULE molecule, void **arg){  char *field =  ARG_EI_GetField(arg);  unsigned long *options = ARG_EI_GetPOptions(arg);  static ExtractInfo extractInfo;  static char flagInit = YES;    /* Init of the extraction info */  if (flagInit) {    extractInfo.nSignals = 1;    extractInfo.dx = 1;    extractInfo.xmin = 0;    extractInfo.flags = EIIntIndex | EIErrorBound;    flagInit = NO;  }  if (molecule->dim == 0) {    SetErrorf("No extraction of atoms in an empty molecule");    return(NULL);  }  extractInfo.xmax = molecule->dim-1;  return(&extractInfo);}static char *atomDoc = "{[<n>]} {Gets the molecule <n> of a molecule}"; static void *GetMoleculeV(MOLECULE molecule, void **arg){  char *field = ARG_G_GetField(arg);  FSIList *fsiList;  unsigned char channel = 0;   /* doc */  if (molecule == NULL) return(atomDoc);  fsiList = ARG_G_GetFsiList(arg);  if(fsiList==NULL) {    SetErrorf("The syntax is mol[<n>]");    return(NULL);  }  if (fsiList->nx != 1) {    SetErrorf("Only a single index can be used");    return(NULL);  }  ARG_G_SetResValue(arg,GetMoleculeAtom(molecule,channel,(int) FSI_FIRST(fsiList)));  return(atomType);}static  void *SetMoleculeV(MOLECULE molecule, void **arg) {  char *field = ARG_S_GetField(arg);  FSIList *fsiList;   /* doc */  if (molecule == NULL) return(atomDoc);    SetErrorf("Atoms from a molecule are read only");  return(NULL); }void *GetCoeff2MoleculeV(MOLECULE molecule, void **arg){  /* Documentation */  if (molecule == NULL) return(coeff2Doc);  return(GetFloatField(molecule->coeff2,arg));}/* * The field list */struct field fieldsMolecule[] = {  "",GetMoleculeV,SetMoleculeV,GetOptionsMoleculeV,GetExtractInfoMoleculeV,    "dim",GetDimMoleculeV,NULL,NULL,NULL,  "coeff2",GetCoeff2MoleculeV,NULL,NULL,NULL,  NULL, NULL, NULL, NULL, NULL};/* * The type structure for MOLECULE */TypeStruct tsMolecule = {  "{{{&mol} {This type corresponds to subspaces spanned by a few atoms and is used in (Harmonic) Matching Pursuit decompositions.}}}",  /* Documentation */  &moleculeType,       /* The basic (unique) type name */  NULL,     /* The GetType function */                           DeleteMolecule,     /* The Delete function */  NewMolecule,     /* The New function */    CopyMolecule,       /* The copy function */  NULL,       /* The clear function */    ToStrMolecule,       /* String conversion */  ShortPrintMolecule,   /* The Print function : print the object when 'print' is called */  PrintInfoMolecule,   /* The PrintInfo function : called by 'info' */  NULL,              /* The NumExtract function : used to deal with syntax like 10a */     fieldsMolecule,      /* The list of fields */};/* EOF */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2017欧美狠狠色| 日韩电影在线免费观看| 日韩av一级片| 99久久综合99久久综合网站| 91麻豆精品国产91久久久| 国产区在线观看成人精品| 亚洲国产成人av网| jlzzjlzz国产精品久久| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 成人污污视频在线观看| 欧美日韩美女一区二区| 亚洲精品欧美在线| av成人免费在线| 欧美国产成人精品| 国产成人精品亚洲777人妖 | 国产精品欧美久久久久一区二区| 日韩精品一区第一页| 欧美亚洲综合另类| 亚洲日本一区二区三区| 成人性生交大合| 国产区在线观看成人精品 | 日本欧美肥老太交大片| 欧美性极品少妇| 亚洲激情第一区| 91久久香蕉国产日韩欧美9色| 国产精品久久久久一区二区三区| 国产精品一二三| 久久久久免费观看| 国产成人在线影院| 中文字幕久久午夜不卡| 高清国产一区二区| 国产精品毛片大码女人| av在线不卡电影| 一区二区三区波多野结衣在线观看| 91片在线免费观看| 亚洲一二三区视频在线观看| 欧美怡红院视频| 亚洲图片自拍偷拍| 在线播放日韩导航| 蜜芽一区二区三区| 2022国产精品视频| 成人黄色软件下载| 亚洲精品国产一区二区精华液| 色先锋aa成人| 视频一区免费在线观看| 日韩精品一区二区三区视频播放 | 日韩国产欧美在线观看| 欧美一区二区女人| 国产精品99久| 亚洲视频狠狠干| 精品视频一区二区不卡| 久久se这里有精品| 国产精品久久久久久福利一牛影视 | 欧美三级电影网站| 人人爽香蕉精品| 日本一二三四高清不卡| 91蜜桃视频在线| 日韩一区精品视频| 中文字幕欧美激情| 6080日韩午夜伦伦午夜伦| 黄页视频在线91| 一区二区在线观看视频| 日韩一区二区在线看片| 成人aa视频在线观看| 日韩成人精品在线| 日本一区二区三区四区在线视频| 日本高清不卡aⅴ免费网站| 麻豆成人免费电影| 一区二区三区中文在线| 日韩一级欧美一级| 色域天天综合网| 久草精品在线观看| 亚洲成人免费av| 中文字幕一区在线观看| 精品少妇一区二区三区免费观看 | 国产成人av一区二区三区在线观看| 国产精品沙发午睡系列990531| 91久久奴性调教| 国产成人免费视频精品含羞草妖精| 亚洲一区二区三区四区在线观看| 久久久久9999亚洲精品| 欧美日韩国产一二三| jlzzjlzz欧美大全| 国产精品白丝jk白祙喷水网站| 亚洲一区在线播放| 综合久久国产九一剧情麻豆| 精品欧美一区二区久久| 欧美丰满少妇xxxbbb| 色乱码一区二区三区88| 成人永久看片免费视频天堂| 久久超级碰视频| 日本成人在线视频网站| 亚洲国产精品人人做人人爽| 最近日韩中文字幕| 久久九九久久九九| 精品国产一区二区三区av性色| 欧美视频一区在线| 欧美亚洲国产怡红院影院| www.亚洲国产| www.av精品| 成人av网址在线| 成人小视频免费观看| 国产一区二区三区久久久| 美女免费视频一区| 蜜臀精品一区二区三区在线观看| 丝袜美腿亚洲一区二区图片| 一区二区三区日韩在线观看| 亚洲图片激情小说| 亚洲美腿欧美偷拍| 亚洲一区在线视频| 亚洲高清不卡在线| 亚洲18影院在线观看| 日韩av一区二区在线影视| 日韩精彩视频在线观看| 日韩av电影天堂| 日本亚洲一区二区| 九九**精品视频免费播放| 老司机精品视频一区二区三区| 视频一区二区中文字幕| 青青草97国产精品免费观看无弹窗版| 亚洲超碰97人人做人人爱| 午夜久久久影院| 欧美96一区二区免费视频| 国产自产高清不卡| 成人做爰69片免费看网站| 99久久99久久精品国产片果冻| eeuss鲁片一区二区三区在线看| 色综合天天综合网国产成人综合天 | 视频一区二区国产| 日本不卡一二三区黄网| 韩国av一区二区三区四区| 国产91在线|亚洲| 91在线无精精品入口| 欧美在线免费播放| 日韩一区国产二区欧美三区| 久久丝袜美腿综合| 亚洲特级片在线| 日韩avvvv在线播放| 国产一区二区三区四区五区美女| 丁香激情综合国产| 欧美日韩美少妇| 久久先锋影音av鲁色资源网| 亚洲欧美日韩系列| 日韩av电影一区| eeuss鲁一区二区三区| 欧美高清你懂得| 日本一区二区三区dvd视频在线 | 亚洲情趣在线观看| 日韩av一区二区在线影视| 成人午夜又粗又硬又大| 欧美日免费三级在线| 久久久亚洲欧洲日产国码αv| 亚洲人成7777| 国模一区二区三区白浆| 99re这里都是精品| 亚洲日本在线a| 久久福利资源站| 色婷婷综合久久久久中文一区二区| 日韩欧美在线123| 亚洲欧美精品午睡沙发| 久久国产夜色精品鲁鲁99| 99精品久久久久久| 精品国产免费一区二区三区四区 | 欧美高清一级片在线观看| 日韩激情中文字幕| 99免费精品视频| 欧美mv日韩mv国产网站| 亚洲成人精品影院| 99久久免费视频.com| 26uuu国产在线精品一区二区| 亚洲高清久久久| 色婷婷亚洲精品| 中文字幕 久热精品 视频在线| 日本亚洲欧美天堂免费| 色屁屁一区二区| 中文字幕一区在线观看视频| 国产精品一二三区在线| 日韩欧美中文字幕精品| 亚洲国产精品自拍| 99国产麻豆精品| 中文字幕免费观看一区| 国产精品亚洲а∨天堂免在线| 欧美一级日韩免费不卡| 亚洲一区二区在线免费观看视频| 国产高清不卡一区二区| 久久九九久久九九| 国产精品影视天天线| 久久综合中文字幕| 国产中文字幕精品| 久久男人中文字幕资源站| 美女网站视频久久| 欧美草草影院在线视频| 麻豆91在线播放| 日韩免费高清av| 精品一区二区三区免费| 91精品国产91久久久久久一区二区| 亚洲一区视频在线| 91精品国模一区二区三区| 无吗不卡中文字幕| 日韩欧美亚洲国产精品字幕久久久|