VisionOS's Weblog

September 30, 2009

ubuntu dist-upgrade

Filed under: uncategorized — visionos @ 5:42 am

sudo do-release-upgrade

September 28, 2009

[C++] function as template typename

Filed under: uncategorized — visionos @ 4:23 am

In the process of implementing equation and optimization algorithms, I encounter the problem of templaterize the algorithm with function types. The functions can be normal C functions, or function classes. The final solution is like this:

template
class Evaluator {
public:
Evaluator(const Functor& f)
: f_(f) {
}
double eval(int x) {
return f_(x);
}
private:
Functor f_;
};

double f(double x) {
return x * x;
}

class F {
public:
double operator(double x) {
return x * x;
}
};

int main(int argc, char* argv[]) {
Evaluator fevaluator(f);
F f2;
Evaluator Fevaluator(f2);
cout << fevaluator.eval(2) << " " << Fevaluator.eval(2) << endl;
}

September 27, 2009

To cure, sometimes, To help, often, To console, always.

Filed under: uncategorized — visionos @ 8:36 pm

— the ancient goals of the medicine carved on a statue honoring physician E.L. Trudeau’s work at Saranac Lake.

September 26, 2009

suggested reading

Filed under: uncategorized — visionos @ 4:28 pm

http://www.scientificblogging.com/adaptive_complexity/how_be_einstein_without_being_genius

Don’t let PhD murder your dream.

made hibernation work on my laptop

Filed under: uncategorized — visionos @ 4:27 pm

3 steps:
1. make sure you have a swap partition
sudo vim /etc/fstab
add something like this:
/dev/sda3 none swap sw 0 0
2. make sure you have /etc/initramfs-tools/conf.d/resume look like this:
RESUME=/dev/sda3
3. finally:
sudo update-initramfs -u

September 25, 2009

graph cuts is a kind of distribution based optimization

Filed under: uncategorized — visionos @ 8:00 pm

Graph cuts does not work with vertices, instead it works on labels. First it divide the labels into two binary sets, and subdivide it further to refine the solution. For each step, it works with all the vertices (random variables) together, which is a kind of binary sampling the whole set of random variables.

test the Latex on WordPress

Filed under: uncategorized — visionos @ 5:40 pm

\alpha + \beta = \frac{\gamma}{\zeta}

distribution based optimization

Filed under: uncategorized — visionos @ 5:31 pm

I come to believe that all the modern optimization methods use some kind of distribution based approaches to overcome the local minimum caveat, including sampling based methods, message based methods. One thing I haven’t figure out is what’s the connection between the graph-cuts methods with the distribution based methods. Need to think more about this later.

update: I found the technique that is related to this idea: estimation of distribution algorithms (EDAs). Need to read more on this to find out the connection and difference.

September 24, 2009

wxWidgets

Filed under: uncategorized — visionos @ 5:27 am

I come to appreciate the design philosophy of wxWidgets, and would like to give it a try.
1. installation under third_party (uncode, opengl, static)
2. image/string/cairo/opengl

High quality tutorials can be found at

http://wiki.wxwidgets.org/Guides_%26_Tutorials

With this nice tutorial, I think someday when I got time, I can add a GUI for my code.

Idiom: Devil is in the detail

Filed under: uncategorized — visionos @ 5:04 am

Idiom: Devil is in the detail

Idiom Definitions for ‘Devil is in the detail’
When people say that the devil in the detail, they mean that small things in plans and schemes that are often overlooked can cause serious problems later on.

Next Page »

Blog at WordPress.com.