EVSL  1.1.0
EigenValues Slicing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
cs_pvec.c
Go to the documentation of this file.
1 #include "cs.h"
2 /* x = b(p), for dense vectors x and b; p=NULL denotes identity */
3 CS_INT cs_pvec (const CS_INT *p, const CS_ENTRY *b, CS_ENTRY *x, CS_INT n)
4 {
5  CS_INT k ;
6  if (!x || !b) return (0) ; /* check inputs */
7  for (k = 0 ; k < n ; k++) x [k] = b [p ? p [k] : k] ;
8  return (1) ;
9 }
#define CS_ENTRY
Definition: cs.h:635
#define CS_INT
Definition: cs.h:627
CS_INT cs_pvec(const CS_INT *p, const CS_ENTRY *b, CS_ENTRY *x, CS_INT n)
Definition: cs_pvec.c:3