Home » Page 2

Hu T.C. Algorithm

An O(n) complex algorithm for solving P | pi=1, in-tree | Cmax problems.
Used to sequence jobs in parallel systems, when all jobs have processing time of 1 unit and precedence defined by in-tree. Read more

Your own TSeeker maps!

Soo… as Belar mentioned some time ago I decided to continue developing my Treasure Seeker. Or at least add some features to it. I have some in my sleeve, but first some fixes requested in comments: more levels, and key binding (it’s difficult to order follower around without numpad keys). And for that I decided to use *.ini file to save config, and provide possibility of creating levels. Read more

Little bit about perfection and boredom

This post was inspired by Ben Whitman and Christer Kaitila. It’s loong and it sums up my thoughts about creating various things. Thank you guys! Read more

Ludum Dare – Treasure Seeker post mortem~!

LD_09

It’s post mortem time~! I really need to post this. Ludum Dare was my fist real compo, and Treasure Seeker (or TSeeker for short) is my first ‘original’ idea… soo… I’m quite excited and all ^__^

You can download it and play here it’s just 3 levels about five minutes long, but hope you’ll like it anyway. Also – if you participated in Ludum Dare I’d be grateful if you rate (:
Read more

Longest and Reverse Processing Time Algorithms

Two simplest algorithms for parallel systems: Longest Processing Time and Reverse Processing Time with Cmax criteria, that gives approximate solution. Read more

Ploter refactoring

Some days ago I mentioned on twitter that I feel trapped inside infinite refactoring loop. I see various places that I’m not satisfied with in my code, and it keeps me from adding new features. Yesterday I finally added one, simple algorithm to check how refactoring simplified code structure… well… it’s not that bad. But I decided to work some more on ploter class. It have some nasty magic numbers and very messy draw function (you can see it here). Read more

FIFO for one mashine sequencing

Simplest possible sequencing alhorithm that utilizes good ol’ Fist-In-Fist-Out queue is used to solve one mashine problems with Cmaxcriteria for jobs with specific relase time. It’s complexity is O(N log N). Read more

Yellow – Red – Blue Refactor

When refactoring really small projects I start with pen & paper and wrote down all classes, variables and methods. Read more

Johnson’s sequencing Algorithm

One of the most basics sequencing algorithms that produce optimal sequence for Cmax criteria (maximum completion time) on Flow-shop system 2 and 3 processors without bottle neck and Proc2 dominated by 1st or 3rd. It’s complexity is O(N log N). Read more

Basic Void pointer arithmetics

Okay, as promissed before my last trek journey (polish only) I’ll share some C/C++ informations I found interesting.

Few hours before trip a friend of mine asked to write bubble sort. Easy. So I wondered where’s the catch – this guy created img processing tool in java. Our conversation beyond this point was something like:

I: “Why don’t you write it down yourself? You are better than me”
Bob: “I need to write it in C++”
I: “Ok, that’s some point. But Java and C++ syntaxes aren’t that different you know”
Bob: “But header for this sort function must be the same as qsort’s.”

And that was the catch. You need to work on void pointers, and that can be confusing for some.

void qsort (void* base, size_t num, size_t size,
            int (*compar)(const void*,const void*));

Call me good-hearted but I did that. I needed to finish packing, cooking my version of „iron ration” and so on, and doing bubble sort seemed easier than explaining how to do it.
Read more