search for: npos

Displaying 20 results from an estimated 64 matches for "npos".

Did you mean: nops
2007 Jun 06
3
C function with unknown output length
Hi all, Could anyone point me to one or more examples in the R sources of a C function that is called without knowing in advance what will be the length (say) of the output vector? To make myself clearer, we have a C function that computes probabilities until their sum gets "close enough" to 1. Hence, the number of probabilities is not known in advance. I would like to have an
2005 Jun 22
2
A polar.plot BUG in plotrix 1.3.3 ?
...------------------- Halldor Bjornsson (halldor at vedur.is) Vedurstofa Islands (Icelandic Met. Office) Bustadavegur 9, IS-150, Reykjavik, Iceland ------------------------------------------ In version 1.3.3 polar.plot<-function(lengths,polar.pos,labels,label.pos,rp.type="r",...) { npos<-length(lengths) # if no positions are given, add the average distance between positions so that # the first and last line don't overlap if(missing(polar.pos)) radial.pos<-seq(0,(2-2/(npos+1))*pi,length=npos) else radial.pos<-pi*polar.pos/180 if(missing(labels)) { labels&...
2018 May 08
1
Proposed speedup of ifelse
...<- if (isS4(test)) methods::as(test, "logical") else as.logical(test) ## this is to ensure the documented behavior re: attributes of result ans <- test len = length(ans) if(nonas <- !anyNA(test)) { ypos = test npos = !test } else { ok <- !(nas <- is.na(test)) ypos = test & ok npos = !test & ok } if(any(ypos, na.rm = TRUE)) ##equivalent to any(test[ok]) ans[ypos] = rep(yes, length.out = len)[ypos] if(any(npos, na.rm = TRUE)) ##equivalent to any(!tes...
2012 Oct 23
0
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
On Oct 23, 2012, at 1:57 PM, Jack Howarth wrote: > Nick, > Can I do this without access to a debug version of dyld? Using the copy of LLVMPolly.so with isl/cloog-isl/gmp statically linked, > I find that if I set the breakpoint to the address of the initializer... > > dyld: calling initializer function 0x100ebb3a0 in /sw/opt/llvm-3.2/lib/LLVMPolly.so > dyld: lazy symbol binding
2018 Sep 30
3
xapian parser bug?
On Sun, Sep 30, 2018 at 09:50:30AM +0100, James Aylett wrote: > Note that I'm using 1.4.7, and from your output I believe you're not > (the * in the query description I believe doesn't happen in those > situations any more). 1.4.4 and later eliminate redundant 0 scaling factors, but this one isn't actually redundant: > > Query(((Tmail AND 0 * XSUBJECTnot at 1)
2012 Oct 23
2
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
...mandLine.h:1072 #19 0x0000000142213271 in llvm::cl::opt<llvm::PluginLoader, false, llvm::cl::parser<std::string> >::handleOccurrence (this=0x1434973e0, pos=2, ArgName={Data = 0x1413259f1 "load=/sw/src/fink.build/llvm32-3.2-0/llvm-3.2/build/lib/LLVMPolly.so", Length = 4, static npos = 18446744073709551615}, Arg={Data = 0x1413259f6 "/sw/src/fink.build/llvm32-3.2-0/llvm-3.2/build/lib/LLVMPolly.so", Length = 63, static npos = 18446744073709551615}) at CommandLine.h:1131 #20 0x0000000142f5e731 in llvm::cl::Option::addOccurrence (this=0x1434973e0, pos=2, ArgName={Data = 0...
2003 Aug 15
0
Re: [R} stars graphs
..."\twhere x is a numeric object and newrange is the extent of the new range\n") } } # plots data as radial lines on a 24 hour "clockface" going clockwise clock24.star<-function(lengths,radial.pos,radial.range) { if(missing(radial.range)) radial.range<-range(radial.pos) npos<-length(radial.pos) newrange<-c(2.5*pi,0.5*pi) # rescale to a range of 0 to 2pi # starting at "12 o'clock" and going clockwise clock.radial.pos<-rescale(c(radial.pos,radial.range),newrange)[1:npos] clock.labels<-as.character(seq(100,2400,by=100)) clock.label.pos<-...
2012 Oct 23
2
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
On Tue, Oct 23, 2012 at 01:05:04PM -0700, Nick Kledzik wrote: > On Oct 23, 2012, at 12:50 PM, Jack Howarth wrote: > > On Mon, Oct 22, 2012 at 11:40:32AM -0700, Nick Kledzik wrote: > >> > >> On Oct 22, 2012, at 11:34 AM, Jack Howarth wrote: > >> > >>> Nick, > >>> I have uploaded the full walk with 'set env
2009 Sep 30
2
C++ parser for doc.get_data() result.
Xapians! Did anybody wrote and would like to share a routines that parse result from doc.get_data() into some key and pair values in C++ ? Code: Xapian::Document doc = i.get_document(); string data = doc.get_data(); mymap = parse_result(data); As you know the data string contain all the data within the document delimited by "=" sign and "\n" new line and needs to be parse
2010 Aug 20
4
Regex exercise
For regular expression afficianados, I'd like a cleverer solution to the following problem (my solution works just fine for my needs; I'm just trying to improve my regex skills): Given the string (entered, say, at a readline prompt): "1 2 -5, 3- 6 4 8 5-7 10" ## only integers will be entered parse it to produce the numeric vector: c(1, 2, 3, 4, 5, 3, 4, 5, 6, 8, 5, 6,
2018 May 03
2
Proposed speedup of ifelse
> I propose a patch to ifelse that leverages anyNA(test) to achieve an > improvement in performance. For a test vector of length 10, the change > nearly halves the time taken and for a test of length 1 million, there > is a tenfold increase in speed. Even for small vectors, the > distributions of timings between the old and the proposed ifelse do > not intersect. For smaller
2012 Oct 24
0
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
...ine.h:1072 > #19 0x0000000142213271 in llvm::cl::opt<llvm::PluginLoader, false, llvm::cl::parser<std::string> >::handleOccurrence (this=0x1434973e0, pos=2, ArgName={Data = 0x1413259f1 "load=/sw/src/fink.build/llvm32-3.2-0/llvm-3.2/build/lib/LLVMPolly.so", Length = 4, static npos = 18446744073709551615}, Arg={Data = 0x1413259f6 "/sw/src/fink.build/llvm32-3.2-0/llvm-3.2/build/lib/LLVMPolly.so", Length = 63, static npos = 18446744073709551615}) at CommandLine.h:1131 > #20 0x0000000142f5e731 in llvm::cl::Option::addOccurrence (this=0x1434973e0, pos=2, ArgName={Dat...
2013 Apr 19
3
[LLVMdev] funny llvm bug
...icious' character, see implementation in MCSectionELF.cpp: StringRef name = getSectionName(); if (name.find_first_not_of("0123456789_." "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ") == name.npos) { OS << "\t.section\t" << name; } else { OS << "\t.section\t\""; As section "name" is something like .mySection,\"aw\", at progbits# , this method puts all the string in quotes. Other targets (COFF and MachO) doesn't hav...
2003 Aug 13
1
stars graphs
Hi listers, A few days ago I posted a question about the use of the stars function on selected lines of a frame. Thanks to two helpers, a closer look at the scale argument allowed to partially solve the problem. Yet I still have a problem with stars. Allow me to explain what I intend to do (sorry for my poor English and the long post): I want to graph an activity index of a fish during the day
2005 Mar 08
0
[LLVMdev] GCC assembler rejects native code generated by LLVM
...----------- Index: X86AsmPrinter.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86AsmPrinter.cpp,v retrieving revision 1.132 diff -r1.132 X86AsmPrinter.cpp 87c87,88 < forCygwin = TT.find("cygwin") != std::string::npos; --- > forCygwin = TT.find("cygwin") != std::string::npos || > TT.find("mingw") != std::string::npos; 89c90 < #ifdef __CYGWIN__ --- > #if defined(__CYGWIN__) || defined(__MINGW32__) -------------- next part -------------- A non-text attachment w...
2005 Nov 23
2
[LLVMdev] llvm-ranlib: Bus Error in regressions + fix
...n Path::makeUnique is called from > Path::createTemporaryFileOnDisk which is called from line 377 of > ArchiveWriter.cpp. This does not appear to be the problem. I excluded the lines from the strace that created this temporary file. After line 377: (gdb) p TmpArchive $2 = {path = {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No data fields>}, _M_p = 0x835407c "temp.GNU.a-PozKFJ"}, static _S_empty_rep_storage = {0, 0, 4, 0}}} (gdb) p archPath $3 = {path = {static npos = 4294967295, _M_dataplus = {<allocator<char...
2013 Feb 08
2
[LLVMdev] assert when mixing static and non-static members with an external AST source
...dDecl that updateExternalFieldOffset expected. I found that the assert occurs when both static and non-static member variables are present. For instance, with the following, the lldb command 'expr my_test.length()' does not assert unless m_a is declared: class test { static const int npos = -1; int m_a; public: int length() { return npos; } }; The problem reproduces with Linux x86_64 targets, but not on Darwin. The issue was introduced in the last month or so, but I'm not sure if it's an issue with lldb or clang. The problem isn't related to the order of the...
2018 Sep 30
1
xapian parser bug?
On Sun, Sep 30, 2018 at 09:05:25AM -0300, David Bremner wrote: > if (str.find (' ') != std::string::npos) > query_str = '"' + str + '"'; > else > query_str = str; > > return parser.parse_query (query_str, NOTMUCH_QUERY_PARSER_FLAGS, term_prefix); I wouldn't recommend trying to generate strings to feed to QueryParser like this code seems to b...
2013 Feb 15
0
[LLVMdev] assert when mixing static and non-static members with an external AST source
...dDecl that updateExternalFieldOffset expected. I found that the assert occurs when both static and non-static member variables are present. For instance, with the following, the lldb command 'expr my_test.length()' does not assert unless m_a is declared: class test { static const int npos = -1; int m_a; public: int length() { return npos; } }; The problem reproduces with Linux x86_64 targets, but not on Darwin. The issue was introduced in the last month or so, but I'm not sure if it's an issue with lldb or clang. The problem isn't related to the order of the...
2013 Apr 19
0
[LLVMdev] funny llvm bug
...e implementation in MCSectionELF.cpp: > > StringRef name = getSectionName(); > if (name.find_first_not_of("0123456789_." > "abcdefghijklmnopqrstuvwxyz" > "ABCDEFGHIJKLMNOPQRSTUVWXYZ") == name.npos) { > OS << "\t.section\t" << name; > } else { > OS << "\t.section\t\""; > > As section "name" is something like .mySection,\"aw\", at progbits# , > this method puts all the string in quotes. > Other targe...