SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/src/Mutils.h
ViewVC logotype

Diff of /pkg/Matrix/src/Mutils.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2348, Mon Mar 23 16:50:14 2009 UTC revision 2351, Wed Mar 25 10:41:05 2009 UTC
# Line 271  Line 271 
271  }  }
272    
273  /**  /**
274   * Return the 0-based index of a match in a vector of class-name strings   * Return the 0-based index of an is() match in a vector of class-name
275   * terminated by an empty string.  Returns -1 for no match.   * strings terminated by an empty string.  Returns -1 for no match.
276   *   *
277   * @param x  an R object, potentially with  is(x, <someClass>)   * @param x  an R object, about which we want is(x, .) information.
278   * @param valid vector of possible matches terminated by an empty string.   * @param valid vector of possible matches terminated by an empty string.
279   * @param rho  the environment in which the class definitions exist.   * @param rho  the environment in which the class definitions exist.
280   *   *
# Line 294  Line 294 
294      /* if not found directly, now search the non-virtual super classes :*/      /* if not found directly, now search the non-virtual super classes :*/
295      if(IS_S4_OBJECT(x)) {      if(IS_S4_OBJECT(x)) {
296          /* now try the superclasses, i.e.,  try   is(x, "....") : */          /* now try the superclasses, i.e.,  try   is(x, "....") : */
297          SEXP classDef = eval(lang2(install("getClassDef"), cl), rho),          SEXP classExts = GET_SLOT(eval(lang2(install("getClassDef"), cl), rho),
298              superCl   = eval(lang2(install("nonVirtualSuperClasses"), classDef),                                    install("contains")),
299                superCl = eval(lang3(install(".selectSuperClasses"),
300                                     classExts,
301                                     /* dropVirtual = */ ScalarLogical(1)),
302                               rho);                               rho);
303          int i;          int i;
304          const char *s_class;          const char *s_class;

Legend:
Removed from v.2348  
changed lines
  Added in v.2351

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge