search for: cardinality

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

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 <- function(x)...
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)], sep=sep) # Try format.cardinal(sample(1:20))
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 illustrati...
2016 Jul 22
3
[PATCH RFC supermin] ext2_initrd: error out if we can't add anything
From: Chen Hanxiao <chenhanxiao@gmail.com> If we failed to add something to initrd, just error out. Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com> --- src/ext2_initrd.ml | 6 +++++- 1 file changed, 5 insertions(+), 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
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 set V...
2007 Mar 01
1
Strange behavior scale and switcher plugin after update
Hi, I have noticed a strange behavior: after the added one of the options "window_match" in scale and switcher plugins; these do not show some windows like gmplayer or amsn's windows This is the output of xprop $ xprop _NET_WINDOW_DECOR(INTEGER) = 20061011, 46149375, 4, 4, 27, 4, 4, 4, 27, 4, 9, 0, 36965, -11, -34, -68, 0, 582, 32767, 0, 0, 32869, 571, -34, -68, 0, 32767,
2002 Jul 12
0
Problem with checksums
I'm trying to write a program that reads an ogg stream and check all the CRC values along the way. But I have big trouble with computing the checksum, or at least I never got checksums that match the one that is in the ogg file. I do set the CRC field in the header to 0 before calculating it. I start with 0 and have no xor at the end. I feed page header with all lacing values and the page
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
On Jun 18, 2014, at 1:20 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > I'm certainly not suggesting this would be better in general 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
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 think t...
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 Pytho...
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
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
On Fri, Jul 22, 2016 at 03:59:58PM +0800, Chen Hanxiao wrote: > From: Chen Hanxiao <chenhanxiao@gmail.com> > > If we failed to add something to initrd, just error out. > > Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com> > --- > src/ext2_initrd.ml | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/ext2_initrd.ml
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 are in...
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() functi...
2006 Jun 15
1
shadowLastChange not updated
Hello, We have an otherwise working Samba PDC+LDAP setup but for one minor detail. The shadowLastChange is not updated when the user sets his password from a Windows workstation (all the necessary Samba*-fields as well as userPassword is updated in LDAP). We've enabled 'ldap passwd sync = Yes' in smb.conf. slapd.conf contains the appropriate access rule for the said field. The
2010 Apr 12
0
[patch] improve reliability of Inflector.transliterate
Hello, I''d like to ask for some feedback on a patch I just submitted. The patch improves the reliability of ActiveSupport::Inflector.transliterate, which currently does not handle many characters from Danish, Swedish, Icelandic, Polish and other European languages. This is because the current code relies upon UTF-8 decomposition, but many common characters do not in fact decompose to
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 requires...
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 exp...