linear

Hadoop for super O(N) or O(N log N) algorithms?

Is there any documented case of Hadoop working for any algorithm that's more than approximately linear? Or does huge data sets pretty much mean that anything above linear is unacceptable? I'm trying to find algorithms that run on Hadoop that to more complicated things than just sorting/agregrating. Thanks! ...

Partial differential equations & lineralization?

I'm implementing a series of Partial Differential Equations solver / numerical algorithms. I'm trying to figure out what algorithms can be easily discretized + solved as linear systems. Anyone have pointeres to books / articles on this? Thanks! ...

Linear Hashing Implementations

Does anyone know if there is a C# implementation of Linear Hashing? Failing that are there any implementations in any other language where the code is available? ...

Using Maxima's linsolve( ) -- problem passing arrays to linsolve( )

Hello, I'm trying to use linsolve( ) from within a subroutine in order to code up a solution algorithm that is independent of the dimension of the problem. The desire is to dynamically allocate the equation and variable arrays within the subroutine itself, pass these to linsolve( ) and hopefully get back the results. /* SUBROUTINE IDE...

Solving Sparse Linear Problem With Some Known Boundary Values

I'm trying to solve a Poisson equation on a rectangular domain which ends up being a linear problem like Ax=b but since I know the boundary conditions, there are nodes where I have the solution values. I guess my question is... How can I solve the sparse system Ax=b if I know what some of the coordinates of x are and the undetermin...

Choose the right classification algorithm. Linear or non-linear?

Hi, I find this question a little tricky. Maybe someone knows an approach to answer this question. Imagine that you have a dataset(training data) which you don't know what it is about. Which features of training data would you look at in order to infer classification algorithm to classify this data? Can we say anything whether we should ...

How do you calculate the reflex angle given to vectors in 3D space?

I want to calculate the angle between two vectors a and b. Lets assume these are at the origin. This can be done with theta = arccos(a . b / |a| * |b|) However arccos gives you the angle in [0, pi], i.e. it will never give you an angle greater than 180 degrees, which is what I want. So how do you find out when the vectors have gone pa...

how to Compute the average probe length for success and failure - Linear probe (Hash Tables)

hi everyone, I'm doing an assignment for my Data Structures class. we were asked to to study linear probing with load factors of .1, .2 , .3, ...., and .9. The formula for testing is: The average probe length using linear probing is roughly Success--> ( 1 + 1/(1-L)**2)/2 or Failure--> (1+1(1-L))/2. we are required to find the theo...

O'Reilly book clarification on 2d linear system

The Oreilly book "Learning openCV" states at page 356 : Quote Before we get totally lost, let’s consider a particular realistic situation of taking measurements on a car driving in a parking lot. We might imagine that the state of the car could be summarized by two position variables, x and y, and two velocities, vx and vy. These four...

How fast can you make linear search?

I'm looking to optimize this linear search: static int linear (const int *arr, int n, int key) { int i = 0; while (i < n) { if (arr [i] >= key) break; ++i; } return i; } The array is sorted and the function is supposed to return the index of the fi...

R: ggplot2, how to get the parameters from a plotted linear model smoother?

I have a data.frame with 3 time series in it, shown below. When I plot them with a smoother time series, I want to be able to get the parameters of the linear model that I plot, but I can't see how to do that? > data day od series_id 1 1 0.10 A1 2 3 1.00 A1 3 5 0.50 A1 4 7 0.7...

Linear Layout Issue at Runtime

Hi all, I am trying to build a layout dynamically which display some text and image for the most part, but has a series of buttons placed next to each other in the bottom. I have a linear layout that carries the text, another linear layout that carries the image. And yet another linear layout that carries the buttons that get created ...

Solving linear programming problems using the graphical method

Hi. I'm having a problem with graphical method in linear programming problems. Image example I don't know how draw the straight line Z=0, Z=6.... ...

Android VideoView LinearLayout.LayoutParams

I am playing a video using VideoView in my app. When I play it on Droid with linearlayout params FILL_PARENT, FILL_PARENT, it plays well. The same params do not work well for a myTouch. What params can I use that will work well with most devices? Thanks Chris ...

Non-graphical linearity estimation

In my previous post, I was looking for correlation ratio ( or 2) routines in R. I was surprised by the fact that no one uses for linearity checking in the GLM procedures. Let's start form a simple example: how do you check linearity of bivariate correlation? Solely with scatterplot? There are several ways of doing this, one way is to ...

Countdown and lifepoints, as3

Hey How do I get accurate counting? My game has is a pass or fail scenario based on time. I need an equation that will work in ActionScript. Thanks Timed-scenarios: 'Commence escape within 30 sec or lose 600 life points' ...you see only readout of lifepoints, but time needs to be accurate I'm not attached to this, it's just an exampl...

How is the intercept computed in the GLM fit ?

Hi! I have been reading the code used by R to fit a generalized linear model (GLM), since the source-code of R is freely available. The algorithm used is called iteratively reweighted least squares (IRLS), which is a fairly documented algorithm. For each iteration, there is a call to a Fortran function to solve the weighted least square...

CSS3 Background Gradient

I have this class set for a page im testing (just starting to try to implement CSS3 so go easy on me). .CSS3TESTDIV{ width:228px; height:300px; background-color: #fff3; background-image: -moz-linear-gradient(0% 100% 90deg, #0068b3, #fff); background-image: -webkit-gradient(linear, 0% 100%, 0% 0%, from(#fff), to(#...

Android - TextView and VideoView problem

I have a TextView inside a LinearLayout and a VideoView inside a LinearLayout. The parent layout is a RelativeLayout that includes the TextView's linear layout and VideoView's linear layout. Since I add the VideoView with FILL_PARENT, FILL_PARENT params (coz I want it to fill the screen in landscape mode), in some phones when I rotat...

Android - Padding in different phones

Say I add a linear layout with top padding of 20. Does it mean that the layout is rendered with 20 pixels of padding in all phones? Or does it scale according to the height/width/density of the phone? Thanks Chris ...