Skip to content

How to create Double Dataset #16

Description

@QEASONT

Hi,
I want to create a dataset with the datatype of double,
I tried to modify the code in create_test_data.cpp as followed

		unsigned bytes_d(sizeof(double)), size_u(1000000), dim_u(dataset[0].size());
                unsigned bytes_u(sizeof(unsigned ))
		out_u.write((char*)&bytes_u, bytes_u);
		out_u.write((char*)&size_u, bytes_u);
		out_u.write((char*)&dim_u, bytes_u);

                for (int i = 0; i < dataset.size(); i++)
		{
			out_u.write((char*)&dataset[i], dim_u * bytes_d);
		}

but it does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions