Relative Content

Tag Archive for data-structures

Analyzing Memory Usage: Java vs C++ Negligible?

How does the memory usage of an integer object written in Java comparecontrast with the memory usage of a integer object written in C++? Is the difference negligible? No difference? A big difference? I’m guessing it’s the same because an int is an int regardless of the language (?)

Data classes: getters and setters or different method design

I’ve been trying to design an interface for a data class I’m writing. This class stores styles for characters, for example whether the character is bold, italic or underlined. But also the font-size and the font-family. So it has different types of member variables. The easiest way to implement this would be to add getters and setters for every member variable, but this just feels wrong to me. It feels way more logical (and more OOP) to call style.format(BOLD, true) instead of style.setBold(true). So to use logical methods instead of getters/setters.

Generic Adjacency List Graph implementation

I am trying to come up with a decent Adjacency List graph implementation so I can start tooling around with all kinds of graph problems and algorithms like traveling salesman and other problems… But I can’t seem to come up with a decent implementation. This is probably because I am trying to dust the cobwebs off my data structures class.

Create association between informations

I deployed a project some days ago that allow to extract some medical articles using the results of a questionnaire completed by a user. For instance, if I reply on questionnaire I’m affected by Diabetes type 2 and I’m a smoker, my algorithm extracts all articles related to diabetes bubbling up all articles contains information about Diabetes type 2 and smoking. Basically we created a list of topic and, for every topic we define a kind of “guideline” that allows to extract and order informations for a user.