索引排序:基于索引的数据流序列化

时间:2015-10-17 02:32:10

标签: sorting c++11 serialization indexing data-stream

我有两个流来自我获取数据的位置。我想输出一个按当前两个流的索引排序的流。 为简单起见,这里是示例代码:

While (1)
{
read.stream1(buffer1,size);
read.stream2(buffer2,size);


int index1 = (int) buffer1[20];
int index2 = (int) buffer2[20];


///// This is the part which I have to do:
sort based on the index, which ever index is small 
send that.
outputbuffer = Sort(index1,buffer1,index2,buffer2);
/////

outputstream.send(outputbuffer);

}

我们没有关于索引收到的信息,比如连续排序数据流,即序列化。

0 个答案:

没有答案