Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lsh c functions #11

Merged
merged 8 commits into from
Feb 17, 2018
Merged

Lsh c functions #11

merged 8 commits into from
Feb 17, 2018

Conversation

ADKosm
Copy link
Owner

@ADKosm ADKosm commented Feb 17, 2018

#2 issue

@ADKosm ADKosm requested a review from Croolis February 17, 2018 10:52
@ADKosm ADKosm self-assigned this Feb 17, 2018
CREATE OR REPLACE FUNCTION dot(anyarray, anyarray)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should use 'lsh' prefix to identify that function is related to this extension?

LANGUAGE C STRICT IMMUTABLE;

CREATE OR REPLACE FUNCTION hash_i(x float4[], w float4[], b float4, r float4)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just 'hash'?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Полный hash - это вектор из посчитанных "малых" хешей.


/*
Calculate dot product between two vectors
Needed for combute <x, w>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Is used to compute'

lib/lsh.c Outdated

/*
Generate random vector with normal distribution N(0, 1)
Needed for generate parameter `w`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Is used to generate number'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants