/* overlapdr_c subroutine * Orverlapping operation * for real value * * Copyright (C) 2007-2011 Alan Layec * * This file is part of modnumlib. * * modnumlib is 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. * * modnumlib 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 modnumlib; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ /* REVISION HISTORY : * $Log$ */ #include "modnum_lib.h" /* overlapadr_c routine de calcul du mot "overlappé" partie réelle * * m1 : taille du vecteur d'entrée * n : longeur du mot à conserver * nb_coef : taille du mot excédentaire * u_r : vecteur d'entrée de taille m1 (m1>n) * z_r : vecteur de sortie de taille nb_coef * */ void overlapadr_c(int *m1,int *n,int *nb_coef,double *u_r,double *z_r) { /*déclaration*/ int i; /*Ajoute les nz éléments précédents au début du vecteur y_r*/ for(i=0;i<(*nb_coef);i++) u_r[i]=u_r[i]+z_r[i]; /*Recopie les nz éxcédentaires de z_res_r dans z*/ for(i=0;i<(*nb_coef);i++) z_r[i]=u_r[(*n)+i]; return; }