search for: cardin

Displaying 20 results from an estimated 93 matches for "cardin".

Did you mean: cardon
2006 Oct 20
1
Cardinality constraint
Hello, How do I implement a cardinality constraint with constrOptim? I want to minimize (least square) a%*%x = 4 subject to x1<2 x2<1 x3<4 count(x1, x2, x3)= 2 (cardinality constraint) Is there a way to specify binary integer variables with constrOptim? Here's my code so far: a <-matrix(1:3,1,3) fr <- functio...
1998 Mar 19
2
a handy function "format.cardinal", looking for a proper name..
This is not a nice name (format is generic; cardinal is not a class) for a nice function, which I would like in several places in R code and therefore would like to become part of R (under a better name !) format.cardinal <- function(i, sep="") paste(i, c("st","nd","rd","th")[pmin(4,i)]...
2012 Jun 15
1
DEoptim example illustrating use of fnMap parameter for enforcement of cardinality constraints
Function DEoptim in package DEoptim for differential evolution defines an optional parameter fnMap: fnMap "an optional function that will be run after each population is created, but before the population is passed to the objective function. This allows the user to impose integer/cardinality constriants." Unfortunately, there is no further documentation decribing the kind of parameters being passed to this function on invocation or the structure of the return value expected. I would very much appreciate it if somebody familiar with this package could provide an example illus...
2016 Jul 22
3
[PATCH RFC supermin] ext2_initrd: error out if we can't add anything
...ertions(+), 1 deletion(-) diff --git a/src/ext2_initrd.ml b/src/ext2_initrd.ml index d4a4e2f..d9a3a99 100644 --- a/src/ext2_initrd.ml +++ b/src/ext2_initrd.ml @@ -151,8 +151,12 @@ let rec build_initrd debug tmpdir modpath initrd = visit topset; close_out chan; + let num_visted = StringSet.cardinal !visited in if debug >= 1 then - printf "supermin: ext2: wrote %d modules to minimal initrd\n%!" (StringSet.cardinal !visited); + printf "supermin: ext2: wrote %d modules to minimal initrd\n%!" num_visted; + + if num_visited == 0 then + error "failed to wr...
2009 Apr 26
1
constrained optimization
Is there any R package addressing problems of constrained optimization ? I have the following "apparently" simple problem: Given a set V with fixed cardinality: nv Given a set S whose cardinality is a parameter: nHat Let the cardinality of the intersection S.and.V be: nHatv The problem consists of maximizing nHatv/nv subject to a penalty if nHat > nHatv It is allowed and even desirable to make set S contain se...
2007 Mar 01
1
Strange behavior scale and switcher plugin after update
...36, 26790, 0, 0, 13, -239, 32767, 240, 1, 49, 18598, 0, 240, 13, -239, 32767, 32767, 241, 49, 27306, 0, -239, 13, 0, 32767, 239, 481, 49, 37033, -11, 0, -319, 13, 331, 32767, 0, 64, 32937, 320, 0, -319, 13, 32767, 32767, 331, 64, 37290, -319, 0, 13, 13, 332, 32767, 664, 64 _NET_WM_ICON_GEOMETRY(CARDINAL) = 999, 0, 110, 24 WM_STATE(WM_STATE): window state: Normal icon window: 0x0 _NET_WM_DESKTOP(CARDINAL) = 0 KWM_WIN_ICON(KWM_WIN_ICON) = 0x300000d, 0x3000014 XdndAware(ATOM) = ARC WM_CLIENT_LEADER(WINDOW): window id # 0x0 WM_PROTOCOLS(ATOM): protocols WM_DELETE_WIN...
2002 Jul 12
0
Problem with checksums
...TByteArray = packed array of Byte; TCharArray = packed array of Char; TOggPageHeader = packed record CapturePattern: packed array [1..4] of Char; StreamStructureVersion, HeaderTypeFlag: Byte; AbsolutePosition: Int64; StreamSerialNumber, PageSequenceNumber, Checksum: Cardinal; PageSegments: Byte; SegmentTable: TByteArray; PageBodyLength: Cardinal; end; procedure ChecksumCalc(var CRC: Cardinal; buffer: Pointer; size: Cardinal); pascal; external; [...] InStream.Read(PageHeader, 27); I := 0; if (PageHeader.CapturePattern <> 'OggS') the...
2010 May 28
3
DAHDI Help (made a cardinal sin :()
Looking for some help from the UK please. I backed up all my Asterisk configuration before re-installing the server from 32 -> 64 bit. Unfortunately I did not transfer the backup to another machine!!!!! I now have a TDM400P that is not picking up the line. Can you see what I have done wrong when I have rebuilt the config please: dahdi_scan ---------- [1] active=yes alarms=OK
2014 Jun 18
4
[LLVMdev] [RFC] Add a simple soft-float class
...than IEEE 754. > > But I think it's suitable for the sorts of places we currently use > hard-floats. I guess you (and Philip) are saying there are dragons here? Numerical analysis is hard. Every numerics expert I have ever worked with considers trying to re-invent floating point a cardinal sin of numerical analysis. Just don’t do it. You will miss important considerations, and you will pay the price for it later. Plus, anyone in the future who wants to modify your code has to learn a new set of non-standard floating point numerics, and without a well-defined specification it’s n...
2004 Apr 10
4
(offtopic) I need two sets of 5 different color scales
...st rates (R and Z)). I actually wrote a plotting function to represent all this, the result is attached -- please have a look at it and help me... I need advice in the following: I need two sets of colors for B and F which are easy to distinguish (when printed on a color laser printer), represent cardinality (ie have an intuitive mapping to an interval) or at least ordinality. I have experimented with the following: Bcolors <- hsv(.6, seq(0.2, 1, length=5), 1) Fcolors <- hsv(seq(.1,0, length=5), seq(0.2, 1, length=5) this is what you see in the plot. What colors would you use? Do you th...
2009 Sep 15
1
R Memory Usage Concerns
....64 0.242133140564 spice 1247036405.23 0.0408620834351 biz_details 1247036405.04 0.40732884407 spice 1247036405.35 0.0501029491425 [evan at t500 ~]$ wc -l 20090708.tab 1797601 20090708.tab So it's basically a CSV file (actually, space delimited) where all of the lines are three columns, a low-cardinality string, a double, and a double. The file itself is 63M. Python can load all of the data from the file really compactly (source for the script at the bottom of the message): [evan at t500 ~]$ python code/scratch/pymem.py VIRT = 25230, RSS = 860 VIRT = 81142, RSS = 55825 So this shows that my...
2014 Jun 18
2
[LLVMdev] [RFC] Add a simple soft-float class
On Jun 18, 2014, at 3:05 PM, Bruce Hoult <bruce at hoult.org> wrote: > On Thu, Jun 19, 2014 at 8:29 AM, Owen Anderson <resistor at mac.com> wrote: > Numerical analysis is hard. Every numerics expert I have ever worked with considers trying to re-invent floating point a cardinal sin of numerical analysis. Just don’t do it. You will miss important considerations, and you will pay the price for it later. > > I don't think anyone is planning to use it to write climate models. Or simulate airflow over a 787. Or even invert a near-singular matrix. > > This...
2007 Apr 10
6
Fullscreen windows(videos) and Compiz
I worte in my last mail that when I ue compiz git fullscreen videos are no longer ontop of the gnome-panel... that means that the gnome-panel is still visible while playing the video in fullscreen. The commit which I said may caused it has nothing to do with it compiz does not build if I revert it). again with older compiz and metacity it works fine. (now I am running 20070316). Anyone else wiith
2016 Jul 22
0
Re: [PATCH RFC supermin] ext2_initrd: error out if we can't add anything
...src/ext2_initrd.ml b/src/ext2_initrd.ml > index d4a4e2f..d9a3a99 100644 > --- a/src/ext2_initrd.ml > +++ b/src/ext2_initrd.ml > @@ -151,8 +151,12 @@ let rec build_initrd debug tmpdir modpath initrd = > visit topset; > close_out chan; > > + let num_visted = StringSet.cardinal !visited in > if debug >= 1 then > - printf "supermin: ext2: wrote %d modules to minimal initrd\n%!" (StringSet.cardinal !visited); > + printf "supermin: ext2: wrote %d modules to minimal initrd\n%!" num_visted; > + > + if num_visited == 0 then >...
2008 Mar 08
1
counting specific elements in a column of a matrix
Hello, I would like to know how to count the number (cardinality) of a specific element in a single row of a matrix. At this time I have 30X3 matrix. The first column is the treatment number for each data point. I would like to know how many of each treatments are in this matrix. i.e. I want to know how many 1's are in column 1, how many 2's ar...
2011 Apr 30
1
help with a survplot
Dear useRs, I was asked to produce a survival curve like this: http://www.palug.net/Members/jabba/immaginetta.png/view with the cardinality of the riskset at the bottom. I do not like doing it, because it doesn't add any valuable information and because it doesn't discriminate between died and censored. Nevertheless, is there someone able to tell me how to do it? Currently the only way I know to it is using the text() f...
2006 Jun 15
1
shadowLastChange not updated
...er software in their latest version (3.0.23 and 0.9.2). Googling I only found some references to ldapchpasswd but my understanding is that this was mainly used by Samba 2.0? How should the update of shadowLastChange field be handled with Samba 3.0? With regards, Poltsi -- Paul-Erik T?rr?nen, Cardinal Information Systems Ltd. Pursimiehenkatu 29-31 C 00150 Helsinki, Finland Mobile: +358 (0)40 703 1231 Phone: +358 (0)424 792 204 Fax: +358 (0)424 792 207 http://www.cardinal.fi/
2010 Apr 12
0
[patch] improve reliability of Inflector.transliterate
...ry common examples are Scandanavian "ø" and German "ß". If you don''t speak any of the affected languages, imagine if the current method deleted all ocurrences of the letter "s" from English strings, and so generated paramater strings like: "234-aint-loui-cardinal" rather than "234-saint-louis-cardinals". In a nutshell, the difference to developers is: Inflector.parameterize("Ærøskøbing") # before patch: "rskbing" # after patch: "aeroskobing" Patch: http://gist.github.com/363923 LH ticket: https://rails.light...
2011 Oct 07
1
BitSet equivalent? Java code usable?
...(small) and capable of bit operations? The Java application relies on BitSet(s) for efficiency reasons. Arrays of logical values cost far too much memory (in the 2nd level heap etc.) while chunks of BitSets easily fit into the first processor cache. Moreover the Bit operations or, xor, and, andnot, cardinality, clone, flip, equals, intersects are much faster done for BitSets than equivalent functions written for logical arrays. Is there any equivalent for BitSet in R? The vector type "logical" seems to be not equally powerful and I do not know its memory requirements. In BitSets a Bit requ...
2007 Feb 07
3
odd mock behavior
I''m seeing some odd behavior around the should_receive() when given a block combined with some cardinality. For example, with the following... my_mock.should_receive(:foo).twice do |i| puts i end ... the spec passes but i never gets puts''ed. With the following... my_mock.should_receive(:foo) do |i| puts i end ... i gets puts''ed twice but the spec fails because it was only...