By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,276 Members | 1,951 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,276 IT Pros & Developers. It's quick & easy.

C++ program implementation for a custom problem

P: 1
I'm stuck at a problem. I want someone to help me with how to proceed further?

I'm working on a problem in C++. Its main idea is as follows.

I have a buffer(vector in my case) in which each item holds 4 values.

start line
end line
start index
end index
I'll receive a line of data. Each line is capable of holding 4096 float values. my program has 4096 such lines spread over 360 degrees.

Step 1: I'll receive 4096 float values. call it as line 1. it can contain a mix of zero and non-zero values.

step 2: find the start index and end index of each non-zero chunk and push it into a vector.

step 3: for each chunk, just before pushing into the vector, check if the start and end are overlapping with any of the existing items.

a. If it is matching,
then update the item which is already present in the vector by changing the start and end line numbers and start index and end index values.

b. else, push a new item with start line and end line as 1 with respective start and end index values.
Step 4: go to step 1 to receive the next line data(line 2).

Step 5: Display all the items in the vector to console for every 64 lines and delete it.

Step 6: Repeat Steps from 1 through 4 to receive all the 4096 lines.

This process is repeated infinitely.

I may miss out on somethings. If someone is ready for discussion, I want to discuss it in a clear cut fashion and to get a working solution.
4 Weeks Ago #1
Share this Question
Share on Google+
1 Reply


dev7060
Expert 100+
P: 183
You are going to need to write some code for this.
4 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.