I'm trying to display the difference in a measure from one day to the next in Excel (2007) by setting the value field setting to 'Difference From' with Base field = day and Base item = previous. If my underlying data is a SSAS cube, the value that displays for each cell is #N/A. If my underlying data is a set of records on another worksh...
I am creating a spreadsheet which has a column of data, and I would like to
calculate the varaince of x number of rows based on x inputed. Any advice?
...
I am trying to figure out the exact meaning of the words Covariance and Contravariance from several articles online and questions on StackOverflow, and from what I can understand, it's only another word for polymorphism.
Am I correct with the above statement? Or have I got it wrong ?
...
Here's the problem. I would like to create a class which will contain configuration data. This data consists of key/value pairs. Some examples: "hostName"="localhost", "timeout"=1000, etc.. My initial idea was to store all these in a generic dictionary:
private Dictionary<string, ConfigurationItem<object>> Configuration =
new Dicti...
I haven't really used variance calculation that much, and I don't know quite what to expect. Actually I'm not too good with math at all.
I have a an array of 1000000 random numeric values in the range 0-10000.
The array could grow even larger, so I use 64 bit int for sum.
I have tried to find code on how to calc variance, but I don't ...
Consider the following (heavily simplified) code:
public T Function<T>() {
if (typeof(T) == typeof(string)) {
return (T) (object) "hello";
}
...
}
It's kind of absurd to first cast to object, then to T. But the compiler has no way of knowing that the previous test assured T is of type string.
What is the most eleg...
Hello,
I'm trying to detect how well an input vector fits a given cluster centre. I can find the best match quite easily (the centre with the minimum euclidean distance to the input vector is the best), however, I now need to work how good a match that is.
To do this I need to find the spread (standard deviation?) of the vectors which ...
I have run two multilevel logistic regressions using the same predictors but on two different responses:
fruitMLM <- lmer(InsuffFruit ~ Income + HDI + Income:HDI + (1 + Income | Country),family=binomial(link="logit"))
fuelMLM <- lmer(Pollution ~ Income + HDI + Income:HDI + (1 + Income | Country),family=binomial(link="logit"))
Income...
@uncheckedVariance can be used to bridge the gap between Scala's declaration site variance annotations and Java's invariant generics.
scala> import java.util.Comparator
import java.util.Comparator
scala> trait Foo[T] extends Comparator[T]
defined trait Foo
scala> trait Foo[-T] extends Comparator[T]
<console>:5: error: contrav...
In the following piece of code I expected to be able to implicitly cast from elements to baseElements because TBase is implicitly convertible to IBase.
public interface IBase { }
public interface IDerived : IBase { }
public class VarianceBug
{
public void Foo<TBase>() where TBase : IBase
{
IEnumerable<TBase> elements = n...
Just a stupid question. I could try it out in 2 minutes, really. It's just that I have 1 GB RAM and have already got 2 instances of VS 2010 open on my desktop, with an instance of VS 2005, too. Opening another instance of VS 2010 would be an over kill.
Can I have a type (for now forgetting its semantics) that can be covariant as well as...
Is there a way to reflect on an interface to detect variance on its generic type parameters and return types? In other words, can I use reflection to differentiate between the two interfaces:
interface IVariant<out R, in A>
{
R DoSomething(A arg);
}
interface IInvariant<R, A>
{
R DoSomething(A arg);
}
The IL for both looks the...
What does the statement mean?
From here
ref and out parameters in C# and
cannot be marked as variant.
1) Does it mean that the following can not be done.
public class SomeClass<R, A>: IVariant<R, A>
{
public virtual R DoSomething( ref A args )
{
return null;
}
}
2) Or does it mean I cannot have the followi...
I've been using var.test and bartlett.test to check basic ANOVA assumptions, among others, homoscedascity (homogeniety, equality of variances). Procedure is quite simple for One-Way ANOVA:
bartlett.test(x ~ g) # where x is numeric, and g is a factor
var.test(x ~ g)
But, for 2x2 tables, i.e. Two-Way ANOVA's, I want to do something lik...
C++ and Java support return-type covariance when overriding methods.
Neither, however, support contra-variance in parameter types - instead, it translates to overloading (Java) or hiding (C++).
Why is that? It seems to me that there is no harm in allowing that. I can find one reason for it in Java - since it has the "choose-the-most-sp...
Suppose I want to add functionality like map to a Scala List, something along the lines of list mapmap f, which applies the function f to each element of list twice. (A more serious example might be implementing a parallel or distributed map, but I don't want to get distracted by details in that direction.)
My first approach would be
o...
The source data :
static double[] felix = new double[] { 0.003027523, 0.002012256, -0.001369238, -0.001737660, -0.001647287,
0.000275154, 0.002017238, 0.001372621, 0.000274148, -0.000913576, 0.001920263, 0.001186456, -0.000364631,
0.000638337, 0.000182266, -0.001275626, -0.000821093, 0.001186998, -0.000455996, -0.0...
Hi,
In Scala variance can be defined with variance operators like + and - on the generic type argument. For example the List type is covariant in the standard library.
class List[+A]
So a function with a covariant list can be defined like this:
def foo[A](list : List[A])
Also variance can be emulated with generic bounds. So we can...
I'm a bit fuzzy on the new Action/Func/Variance/CoVariance stuff, which is probably what I need.
What I want is to be able to pass a delegate as a parameter to a method, that takes a string and returns a bool. The problem is that I can't use a typed delegate or interface since it will be used in different libraries which doesn't share l...