Okay, it worked when I took stringtruth.resize out of the loop.
Now, I'm running into an issue. It's calculating everything as a true positive or false negative when it should have some in the...
Type: Posts; User: carpeltunnel
Okay, it worked when I took stringtruth.resize out of the loop.
Now, I'm running into an issue. It's calculating everything as a true positive or false negative when it should have some in the...
int i is to increment through the string2 strings, index is to get a value for each hash function of that string
The error doesn't appear on a line, during executing it pops up "debug assertion...
I changed the vector to int instead of bool because I was seeing if that was the problem. I know the function call works within searhhash(), and truthtable works, but it freezes up and says out of...
do you need something else?
vector <bool> bloomprediction = bloom.searchhash();
This is supposed to take the return vector from search of of Boolean value and store into Boolean vector in main.
When it gets to this line...
Just a value at a time, I have it in a for loop that increments through all strings and hash functions.
Well my current attempt is this:
std::vector <bool> truthtable = valuei.at(index);
But I think I'm getting farther away.
Wow, it's the easiest things that waste the most time.
One more stupid question, I'm trying to set the value of the index to true in a vector <bool> but I am having trouble getting the syntax to...
Well, I don't think it is passing anything now, at the beginning of my function I initialize it to 0 and after the second function call it prints 0 still. I am having trouble figuring out why..
No I'm doing return x
for (int i = 0; i < String.size(); i++){
mystring = String.at(i);
std::cout<<mystring<<std::endl;
mystringmap(mystring, tablesize);
std::cout << "string value in...
Well I initialized my stringvalue to 0 in my function, it prints 0, so the value is not being sent from the function call. I'll look at it for a while.
I'm using std::string, yes. But I'm trying to return an integer value back to my function, so why would it pass an address if that is the case?
If I am trying take the "stringvalue" and return it to a function in my class (this is a function in separate file). Why might I receive an address value in my class function?
Can anyone explain why nothing within the for loop is printing? I understand you may not be able to with only a snippet.
int i = 0;
int length = 0;
int stringvalue = 0;
Thanks!
Is there a way to find where in my code this issue is being caused?
line:932
expression: vector subscript is out of range
I have no compiler error or warning and I am using...
I cannot figure out what is wrong with this.
for (int i = 0; i < 10; i++){
mystringmap(String[i]);
//hash function h[i]k = ((a[i]*k*b[i])%p)%m
for (int index = 0; index...
.cpp
bloomfilter::bloomfilter(int m, long long p, int c):primenumber(p), tablesize(m), hashfunctions(c), vector <int> A(c), vector <int> B (c){
}
.h
public:
bloomfilter(int, long long,...
So this section of code is supposed to read in the file, read in the first line to get the values needs. Then read in the second line open it and store the strings into a vector I am getting:
some...
bump
Alright, I am attempting to write a program that implements a bloom filter with a given set of hash functions from an input file that give m p c a0 b0.....a(c-1) b(c-1).
m = number of locations...
Is the issue with the output file, I've looked at some of my past code that works correctly and I don't see what is wrong unless I need to index through the elements but I didn't see anything needed...
#include <string>
#include <sstream>
#include <iostream>
#include <fstream>
using namespace std;
struct queue_element {
string data;
float priority;
friend ostream& operator << (ostream&...
I guess a big help would be what do I need to do in main, and what do I need to do in my class.
OK, I'm going to bite the bullet and post my code. I would like to preface to say the original deadline is passed so I tried to put a lot of related material in before turning in (I know bad, but I...
I guess my main problem is making the association between the mapping and the requirement for an array based heap.