Comments (4)
Добавлен конструктор Union
, который инициализирует объект как bare (без инициализации).
from libgod.
ну судя по обновлению теста test_storage немного не то получилось. Ты все равно передаешь union параметры:
libgod::Union nunion(dp,dc);
storage.read(nunion);
storage.dump(std::cout, nunion);
Тут больше интересует случай, когда мы делаем вот так:
libgod::Union un;
libgod::Storage st( argv[1] );
st.read(un);
//Print dump to stdout
st.dump(std::cout, un);
Тут получается два интересных случай.
-
Я создал юнион вот таким кодом:
//input.union1: Union with 1 empty set libgod::Union un1(10,7); libgod::Set& s = un1.add(); libgod::Storage st1("input.union1"); st1.write(un1); // Print dump to cout st1.dump(std::cout, un1);
В ответ st1.dump(std::cout, un1) распечатало все правильно. Но если я использую код, который привел в самом начале, чтобы попытаться тоже вывести дамп, то получается вывод вот такой:
<God>
<header>
<version>1</version>
<comment></comment>
</header>
<metric>
<parameterDim>1</parameterDim>
<criteriaDim>1</criteriaDim>
<setsCount>1</setsCount>
</metric>
<union>
<Set>
<pointCount>0</pointCount>
<points>
</points>
</Set>
</union>
</God>
То есть лучше, чем раньше было (появилась информация о сете), но параметры все равно неправильные.
-
Если я создал юнион с непустым сетом, например, так:
const size_t dp = 2, dc = 3; libgod::Union un3(dp,dc); for (int i=0; i<10; i++) { libgod::Set& s = un3.add(); for (int j=0; j<(i+1); j++) s.add(randPoint(dp,dc)); } libgod::Storage st3("input.union3"); st3.write(un3); st3.dump(std::cout, un3);
То при попытке использовать код для распечатки (из начала) получаю ошибку:
Print error: boost::too_few_args: format-string referred to more arguments than were passed
from libgod.
boost::too_few_args пофиксил в 90f311b
from libgod.
хм... после твоего фикса
Print error: parameter index 1 is out of range 1
from libgod.
Related Issues (14)
- build.sh doesn't build HOT 1
- desctructor for Union HOT 1
- change filename for Storage HOT 1
- change filename for Storage
- wrong output when use setparameters and setcriteria functions HOT 4
- storage::read/write throws exception basic_ios::clear in full filenames specified HOT 1
- segmentaion fault for null pointers in libgod::Point HOT 1
- if I pass pointers to arrays with larger size than dims, it works HOT 1
- libgod::Point should throw exception in case of equal ptr usage
- liggod::Set set1(<negative number>, num) doesn't thrown exception HOT 3
- add parameters inherit for libgod::Set and libgod::Uninon dflt consturctors HOT 2
- undefined reference to `pthread_getspecific'
- test_comparable failing with gcc-4.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgod.