IRC logs of #shogun for Saturday, 2011-07-02

--- Log opened Sat Jul 02 00:00:38 2011
f-xsonney2k: still around?00:10
@sonney2kf-x, yes00:13
f-xsonney2k: a bit of a doubt with the templating00:13
@sonney2klistening00:13
f-xright now StreamingFile (topmost base class) has00:14
f-xdummy implementations of all the get_*_vector functions00:14
@sonney2kyes00:14
f-xand the derived classes implement whichever functions are apt for that particular feature00:14
f-xso the base class function is called if left unimplemented in the derived class00:15
@sonney2kok00:15
f-xnow if we template the derived class, say StreamingFileFromSimpleFeatures<T>00:15
f-xfor T==int, we'd need to call get_int_vector etc00:15
f-xbut for say T==float64_t, we'd call get_real_vector00:16
f-xright?00:16
@sonney2kyes00:16
f-xso here's my doubt:00:16
f-xin the class definition, all the appropriate get_*_vector functions must be present, shouldn't they?00:16
f-xi mean, T==int implements get_int_vector00:16
f-xT==double implements get_real_vector etc00:17
f-xso the class must contain the declarations for ALL these functions00:17
f-xand the specialized version must be defined depending on the type00:17
@sonney2kyes00:18
f-xsonney2k: say, for example that we call get_real_vector() on a class with type==int00:18
f-xthat should be an SG_ERROR or something similar00:18
f-xbut if we call get_real_vector on a class with type==float64_t, it should work00:19
f-xam i being somewhat understandable?00:19
@sonney2kyes00:19
f-xsonney2k: so basically each function's implementation should depend on type T?00:20
@sonney2kyeah and since we don't have tempalted get_*vector stuff we have a problem00:21
f-xsonney2k: right..00:21
f-xi mean we can specialize get_int_vector for T==int00:22
f-xbut the other functions still need to be defined somehow00:22
f-xwe can have a trivial implementation for each function saying something like00:22
f-xbase::get_int_vector()00:22
@sonney2kf-x, but then you could again use macros to resolve this or?00:22
f-xor void get_*_vector() { base_get_*_vector() }00:22
f-xbase::get_*_vector() i mean00:23
f-xsonney2k: yes, that's possible.. so is this implementation alright?00:23
f-xcalling the base class function?00:23
f-xi'm asking because it looks a bit dirty.. maybe there's a cleaner solution i'm not seeing00:24
@sonney2kf-x, say if get_vector was templated - then we wouldn't have this problem or?00:24
f-xsonney2k: exactly - that would solve everything00:24
f-xbut we would need to template the base class too00:24
@sonney2kf-x, but with get_vector being templated - we cannot do the inheritance nicely...00:25
f-xsonney2k: yes.. the code would be dirty, but the design would be nice00:25
f-xit is possible to make it work, but not without some ugly-looking code00:26
@sonney2kbut if you would add a private get_vector etc function in the derived class that is specialized the problem would be solved for that class right?00:26
@sonney2kor wait even better00:26
@sonney2kyou can do that in the base class00:26
@sonney2kI mean you just define that function templated00:26
@sonney2kand make it call the specialized variants depending on type00:27
@sonney2ksince this function is never overloaded it will work00:28
f-xsonney2k: a single get_vector() function00:28
f-xwhich specializes based on class type T00:28
@sonney2kf-x, in addition to all these get_*_vector functions00:28
@sonney2kyes00:28
@sonney2kjust a templated function not class00:29
f-xsonney2k: i'm beginning to see your point00:29
@sonney2kf-x, I would suggest to try this out just for vectors00:33
@sonney2kif it works it would even make sense to use this principle for file interfaces etc00:34
f-xsonney2k: okay.. sounds like a great idea.. will need to try it first to get a hang of it00:35
f-xi'll do it now00:35
alesis_sonney2k, is shogun currently fully working (and are SimpleFeatures still supported)?00:44
-!- alesis_ is now known as alesis-novik00:44
-!- alesis-novik [~alesis@cpat001.wlan.net.ed.ac.uk] has quit [Quit: Leaving]00:44
-!- alesis-novik [~alesis@cpat001.wlan.net.ed.ac.uk] has joined #shogun00:45
alesis-noviksonney2k, is shogun currently fully working (and are SimpleFeatures still supported)?00:45
-!- blackburn [~blackburn@31.28.40.202] has quit [Quit: Leaving.]00:49
@sonney2kalesis-novik, sure00:50
alesis-novikah, I know where my mistake was.01:00
@sonney2knite everyone01:17
-!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has joined #shogun02:01
-!- f-x [~user@117.192.203.89] has quit [Remote host closed the connection]02:44
-!- alesis-novik [~alesis@cpat001.wlan.net.ed.ac.uk] has quit [Ping timeout: 240 seconds]02:49
-!- alesis-novik [~alesis@cpat001.wlan.net.ed.ac.uk] has joined #shogun02:51
-!- alesis-novik [~alesis@cpat001.wlan.net.ed.ac.uk] has quit [Ping timeout: 258 seconds]03:51
-!- alesis-novik [~alesis@cpat001.wlan.net.ed.ac.uk] has joined #shogun03:53
-!- in3xes_ [~in3xes@180.149.49.230] has quit [Quit: Ooops..!!]05:01
-!- alesis-novik [~alesis@cpat001.wlan.net.ed.ac.uk] has quit [Quit: I'll be Bach]05:07
-!- in3xes_ [~in3xes@180.149.49.227] has joined #shogun08:22
-!- in3xes [~in3xes@180.149.49.227] has quit [Ping timeout: 276 seconds]08:26
-!- blackburn [~blackburn@31.28.40.202] has joined #shogun11:34
-!- in3xes1 [~in3xes@210.212.58.111] has joined #shogun13:13
-!- in3xes_ [~in3xes@180.149.49.227] has quit [Ping timeout: 240 seconds]13:16
CIA-32shogun: Alesis Novik master * r45938db / (4 files in 2 dirs): Migrating to SG* - http://bit.ly/j6iPhg13:17
CIA-32shogun: Soeren Sonnenburg master * r9d54d81 / (4 files in 2 dirs):13:17
CIA-32shogun: Merge pull request #164 from alesis/gmm13:17
CIA-32shogun: GMM overhaul with SG* - http://bit.ly/jf0g0513:17
CIA-32shogun: Alesis Novik master * rb489910 / src/libshogun/clustering/GMM.cpp : Bug fixes for GMM - http://bit.ly/jLk3oP13:17
-!- in3xes_ [~in3xes@180.149.49.227] has joined #shogun14:33
-!- in3xes1 [~in3xes@210.212.58.111] has quit [Ping timeout: 240 seconds]14:36
-!- in3xes1 [~in3xes@180.149.49.227] has joined #shogun15:36
-!- in3xes_ [~in3xes@180.149.49.227] has quit [Ping timeout: 240 seconds]15:40
-!- blackburn [~blackburn@31.28.40.202] has quit [Quit: Leaving.]16:33
-!- in3xes1 is now known as in3xes16:40
-!- f-x [~user@117.192.218.221] has joined #shogun16:48
-!- in3xes [~in3xes@180.149.49.227] has quit [Quit: Leaving]18:46
-!- in3xes [~in3xes@180.149.49.227] has joined #shogun18:52
-!- f-x [~user@117.192.218.221] has quit [Remote host closed the connection]19:25
-!- in3xes_ [~in3xes@59.163.196.162] has joined #shogun20:28
-!- in3xes [~in3xes@180.149.49.227] has quit [Ping timeout: 258 seconds]20:31
CIA-32shogun: Alesis Novik master * rdf56be0 / (2 files): Added set_* for GMM - http://bit.ly/iXeQTG20:47
CIA-32shogun: Soeren Sonnenburg master * r69e1291 / (2 files):20:47
CIA-32shogun: Merge pull request #165 from alesis/gmm20:47
CIA-32shogun: Added set_* for GMM and cluster methods - http://bit.ly/mcYLC020:47
-!- in3xes_ is now known as in3xes20:47
-!- in3xes [~in3xes@59.163.196.162] has quit [Quit: Leaving]21:26
-!- in3xes [~in3xes@180.149.49.227] has joined #shogun21:27
-!- blackburn1 [~blackburn@188.122.238.13] has joined #shogun22:02
-!- blackburn1 [~blackburn@188.122.238.13] has quit [Quit: Leaving.]22:05
-!- blackburn [~blackburn@188.122.238.13] has joined #shogun22:05
-!- f-x [~user@117.192.218.221] has joined #shogun22:56
blackburnнет23:02
blackburnwrong window lol23:02
bettyboohoho!!23:02
--- Log closed Sun Jul 03 00:00:40 2011

Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!