mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-11-13 07:05:10 +01:00
[docx] split commit for file 200
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
72eda9a24f
commit
6c4587804f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
.DS_Store
|
||||
|
BIN
.gitignore.docx
Normal file
BIN
.gitignore.docx
Normal file
Binary file not shown.
661
COPYING
661
COPYING
@ -1,661 +0,0 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
BIN
COPYING.docx
Normal file
BIN
COPYING.docx
Normal file
Binary file not shown.
BIN
README.docx
Normal file
BIN
README.docx
Normal file
Binary file not shown.
69
README.md
69
README.md
@ -1,69 +0,0 @@
|
||||
# Twitter's Recommendation Algorithm
|
||||
|
||||
Twitter's Recommendation Algorithm is a set of services and jobs that are responsible for serving feeds of Tweets and other content across all Twitter product surfaces (e.g. For You Timeline, Search, Explore, Notifications). For an introduction to how the algorithm works, please refer to our [engineering blog](https://blog.twitter.com/engineering/en_us/topics/open-source/2023/twitter-recommendation-algorithm).
|
||||
|
||||
## Architecture
|
||||
|
||||
Product surfaces at Twitter are built on a shared set of data, models, and software frameworks. The shared components included in this repository are listed below:
|
||||
|
||||
| Type | Component | Description |
|
||||
|------------|------------|------------|
|
||||
| Data | [tweetypie](tweetypie/server/README.md) | Core Tweet service that handles the reading and writing of Tweet data. |
|
||||
| | [unified-user-actions](unified_user_actions/README.md) | Real-time stream of user actions on Twitter. |
|
||||
| | [user-signal-service](user-signal-service/README.md) | Centralized platform to retrieve explicit (e.g. likes, replies) and implicit (e.g. profile visits, tweet clicks) user signals. |
|
||||
| Model | [SimClusters](src/scala/com/twitter/simclusters_v2/README.md) | Community detection and sparse embeddings into those communities. |
|
||||
| | [TwHIN](https://github.com/twitter/the-algorithm-ml/blob/main/projects/twhin/README.md) | Dense knowledge graph embeddings for Users and Tweets. |
|
||||
| | [trust-and-safety-models](trust_and_safety_models/README.md) | Models for detecting NSFW or abusive content. |
|
||||
| | [real-graph](src/scala/com/twitter/interaction_graph/README.md) | Model to predict the likelihood of a Twitter User interacting with another User. |
|
||||
| | [tweepcred](src/scala/com/twitter/graph/batch/job/tweepcred/README) | Page-Rank algorithm for calculating Twitter User reputation. |
|
||||
| | [recos-injector](recos-injector/README.md) | Streaming event processor for building input streams for [GraphJet](https://github.com/twitter/GraphJet) based services. |
|
||||
| | [graph-feature-service](graph-feature-service/README.md) | Serves graph features for a directed pair of Users (e.g. how many of User A's following liked Tweets from User B). |
|
||||
| | [topic-social-proof](topic-social-proof/README.md) | Identifies topics related to individual Tweets. |
|
||||
| | [representation-scorer](representation-scorer/README.md) | Compute scores between pairs of entities (Users, Tweets, etc.) using embedding similarity. |
|
||||
| Software framework | [navi](navi/README.md) | High performance, machine learning model serving written in Rust. |
|
||||
| | [product-mixer](product-mixer/README.md) | Software framework for building feeds of content. |
|
||||
| | [timelines-aggregation-framework](timelines/data_processing/ml_util/aggregation_framework/README.md) | Framework for generating aggregate features in batch or real time. |
|
||||
| | [representation-manager](representation-manager/README.md) | Service to retrieve embeddings (i.e. SimClusers and TwHIN). |
|
||||
| | [twml](twml/README.md) | Legacy machine learning framework built on TensorFlow v1. |
|
||||
|
||||
The product surfaces currently included in this repository are the For You Timeline and Recommended Notifications.
|
||||
|
||||
### For You Timeline
|
||||
|
||||
The diagram below illustrates how major services and jobs interconnect to construct a For You Timeline.
|
||||
|
||||
![](docs/system-diagram.png)
|
||||
|
||||
The core components of the For You Timeline included in this repository are listed below:
|
||||
|
||||
| Type | Component | Description |
|
||||
|------------|------------|------------|
|
||||
| Candidate Source | [search-index](src/java/com/twitter/search/README.md) | Find and rank In-Network Tweets. ~50% of Tweets come from this candidate source. |
|
||||
| | [cr-mixer](cr-mixer/README.md) | Coordination layer for fetching Out-of-Network tweet candidates from underlying compute services. |
|
||||
| | [user-tweet-entity-graph](src/scala/com/twitter/recos/user_tweet_entity_graph/README.md) (UTEG)| Maintains an in memory User to Tweet interaction graph, and finds candidates based on traversals of this graph. This is built on the [GraphJet](https://github.com/twitter/GraphJet) framework. Several other GraphJet based features and candidate sources are located [here](src/scala/com/twitter/recos). |
|
||||
| | [follow-recommendation-service](follow-recommendations-service/README.md) (FRS)| Provides Users with recommendations for accounts to follow, and Tweets from those accounts. |
|
||||
| Ranking | [light-ranker](src/python/twitter/deepbird/projects/timelines/scripts/models/earlybird/README.md) | Light Ranker model used by search index (Earlybird) to rank Tweets. |
|
||||
| | [heavy-ranker](https://github.com/twitter/the-algorithm-ml/blob/main/projects/home/recap/README.md) | Neural network for ranking candidate tweets. One of the main signals used to select timeline Tweets post candidate sourcing. |
|
||||
| Tweet mixing & filtering | [home-mixer](home-mixer/README.md) | Main service used to construct and serve the Home Timeline. Built on [product-mixer](product-mixer/README.md). |
|
||||
| | [visibility-filters](visibilitylib/README.md) | Responsible for filtering Twitter content to support legal compliance, improve product quality, increase user trust, protect revenue through the use of hard-filtering, visible product treatments, and coarse-grained downranking. |
|
||||
| | [timelineranker](timelineranker/README.md) | Legacy service which provides relevance-scored tweets from the Earlybird Search Index and UTEG service. |
|
||||
|
||||
### Recommended Notifications
|
||||
|
||||
The core components of Recommended Notifications included in this repository are listed below:
|
||||
|
||||
| Type | Component | Description |
|
||||
|------------|------------|------------|
|
||||
| Service | [pushservice](pushservice/README.md) | Main recommendation service at Twitter used to surface recommendations to our users via notifications.
|
||||
| Ranking | [pushservice-light-ranker](pushservice/src/main/python/models/light_ranking/README.md) | Light Ranker model used by pushservice to rank Tweets. Bridges candidate generation and heavy ranking by pre-selecting highly-relevant candidates from the initial huge candidate pool. |
|
||||
| | [pushservice-heavy-ranker](pushservice/src/main/python/models/heavy_ranking/README.md) | Multi-task learning model to predict the probabilities that the target users will open and engage with the sent notifications. |
|
||||
|
||||
## Build and test code
|
||||
|
||||
We include Bazel BUILD files for most components, but not a top-level BUILD or WORKSPACE file. We plan to add a more complete build and test system in the future.
|
||||
|
||||
## Contributing
|
||||
|
||||
We invite the community to submit GitHub issues and pull requests for suggestions on improving the recommendation algorithm. We are working on tools to manage these suggestions and sync changes to our internal repository. Any security concerns or issues should be routed to our official [bug bounty program](https://hackerone.com/twitter) through HackerOne. We hope to benefit from the collective intelligence and expertise of the global community in helping us identify issues and suggest improvements, ultimately leading to a better Twitter.
|
||||
|
||||
Read our blog on the open source initiative [here](https://blog.twitter.com/en_us/topics/company/2023/a-new-era-of-transparency-for-twitter).
|
BIN
RETREIVAL_SIGNALS.docx
Normal file
BIN
RETREIVAL_SIGNALS.docx
Normal file
Binary file not shown.
@ -1,51 +0,0 @@
|
||||
# Signals for Candidate Sources
|
||||
|
||||
## Overview
|
||||
|
||||
The candidate sourcing stage within the Twitter Recommendation algorithm serves to significantly narrow down the item size from approximately 1 billion to just a few thousand. This process utilizes Twitter user behavior as the primary input for the algorithm. This document comprehensively enumerates all the signals during the candidate sourcing phase.
|
||||
|
||||
| Signals | Description |
|
||||
| :-------------------- | :-------------------------------------------------------------------- |
|
||||
| Author Follow | The accounts which user explicit follows. |
|
||||
| Author Unfollow | The accounts which user recently unfollows. |
|
||||
| Author Mute | The accounts which user have muted. |
|
||||
| Author Block | The accounts which user have blocked |
|
||||
| Tweet Favorite | The tweets which user clicked the like botton. |
|
||||
| Tweet Unfavorite | The tweets which user clicked the unlike botton. |
|
||||
| Retweet | The tweets which user retweeted |
|
||||
| Quote Tweet | The tweets which user retweeted with comments. |
|
||||
| Tweet Reply | The tweets which user replied. |
|
||||
| Tweet Share | The tweets which user clicked the share botton. |
|
||||
| Tweet Bookmark | The tweets which user clicked the bookmark botton. |
|
||||
| Tweet Click | The tweets which user clicked and viewed the tweet detail page. |
|
||||
| Tweet Video Watch | The video tweets which user watched certain seconds or percentage. |
|
||||
| Tweet Don't like | The tweets which user clicked "Not interested in this tweet" botton. |
|
||||
| Tweet Report | The tweets which user clicked "Report Tweet" botton. |
|
||||
| Notification Open | The push notification tweets which user opened. |
|
||||
| Ntab click | The tweets which user click on the Notifications page. |
|
||||
| User AddressBook | The author accounts identifiers of the user's addressbook. |
|
||||
|
||||
## Usage Details
|
||||
|
||||
Twitter uses these user signals as training labels and/or ML features in the each candidate sourcing algorithms. The following tables shows how they are used in the each components.
|
||||
|
||||
| Signals | USS | SimClusters | TwHin | UTEG | FRS | Light Ranking |
|
||||
| :-------------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- | :----------------- |
|
||||
| Author Follow | Features | Features / Labels | Features / Labels | Features | Features / Labels | N/A |
|
||||
| Author Unfollow | Features | N/A | N/A | N/A | N/A | N/A |
|
||||
| Author Mute | Features | N/A | N/A | N/A | Features | N/A |
|
||||
| Author Block | Features | N/A | N/A | N/A | Features | N/A |
|
||||
| Tweet Favorite | Features | Features | Features / Labels | Features | Features / Labels | Features / Labels |
|
||||
| Tweet Unfavorite | Features | Features | N/A | N/A | N/A | N/A |
|
||||
| Retweet | Features | N/A | Features / Labels | Features | Features / Labels | Features / Labels |
|
||||
| Quote Tweet | Features | N/A | Features / Labels | Features | Features / Labels | Features / Labels |
|
||||
| Tweet Reply | Features | N/A | Features | Features | Features / Labels | Features |
|
||||
| Tweet Share | Features | N/A | N/A | N/A | Features | N/A |
|
||||
| Tweet Bookmark | Features | N/A | N/A | N/A | N/A | N/A |
|
||||
| Tweet Click | Features | N/A | N/A | N/A | Features | Labels |
|
||||
| Tweet Video Watch | Features | Features | N/A | N/A | N/A | Labels |
|
||||
| Tweet Don't like | Features | N/A | N/A | N/A | N/A | N/A |
|
||||
| Tweet Report | Features | N/A | N/A | N/A | N/A | N/A |
|
||||
| Notification Open | Features | Features | Features | N/A | Features | N/A |
|
||||
| Ntab click | Features | Features | Features | N/A | Features | N/A |
|
||||
| User AddressBook | N/A | N/A | N/A | N/A | Features | N/A |
|
@ -1,15 +0,0 @@
|
||||
target(
|
||||
name = "faiss",
|
||||
dependencies = [
|
||||
"ann/src/main/java/com/twitter/ann/faiss/swig:swig-artifactory",
|
||||
],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "swig-native-utils",
|
||||
sources = ["*.java"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [],
|
||||
)
|
BIN
ann/src/main/java/com/twitter/ann/faiss/BUILD.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/BUILD.docx
Normal file
Binary file not shown.
BIN
ann/src/main/java/com/twitter/ann/faiss/NativeUtils.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/NativeUtils.docx
Normal file
Binary file not shown.
@ -1,151 +0,0 @@
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class NativeUtils {
|
||||
|
||||
private static final int MIN_PREFIX_LENGTH = 3;
|
||||
public static final String NATIVE_FOLDER_PATH_PREFIX = "nativeutils";
|
||||
|
||||
public static File temporaryDir;
|
||||
|
||||
private NativeUtils() {
|
||||
}
|
||||
|
||||
private static File unpackLibraryFromJarInternal(String path) throws IOException {
|
||||
if (null == path || !path.startsWith("/")) {
|
||||
throw new IllegalArgumentException("The path has to be absolute (start with '/').");
|
||||
}
|
||||
|
||||
String[] parts = path.split("/");
|
||||
String filename = (parts.length > 1) ? parts[parts.length - 1] : null;
|
||||
|
||||
if (filename == null || filename.length() < MIN_PREFIX_LENGTH) {
|
||||
throw new IllegalArgumentException("The filename has to be at least 3 characters long.");
|
||||
}
|
||||
|
||||
if (temporaryDir == null) {
|
||||
temporaryDir = createTempDirectory(NATIVE_FOLDER_PATH_PREFIX);
|
||||
temporaryDir.deleteOnExit();
|
||||
}
|
||||
|
||||
File temp = new File(temporaryDir, filename);
|
||||
|
||||
try (InputStream is = NativeUtils.class.getResourceAsStream(path)) {
|
||||
Files.copy(is, temp.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (IOException e) {
|
||||
temp.delete();
|
||||
throw e;
|
||||
} catch (NullPointerException e) {
|
||||
temp.delete();
|
||||
throw new FileNotFoundException("File " + path + " was not found inside JAR.");
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpack library from JAR into temporary path
|
||||
*
|
||||
* @param path The path of file inside JAR as absolute path (beginning with
|
||||
* '/'), e.g. /package/File.ext
|
||||
* @throws IOException If temporary file creation or read/write
|
||||
* operation fails
|
||||
* @throws IllegalArgumentException If source file (param path) does not exist
|
||||
* @throws IllegalArgumentException If the path is not absolute or if the
|
||||
* filename is shorter than three characters
|
||||
* (restriction of
|
||||
* {@link File#createTempFile(java.lang.String, java.lang.String)}).
|
||||
* @throws FileNotFoundException If the file could not be found inside the
|
||||
* JAR.
|
||||
*/
|
||||
public static void unpackLibraryFromJar(String path) throws IOException {
|
||||
unpackLibraryFromJarInternal(path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads library from current JAR archive
|
||||
* <p>
|
||||
* The file from JAR is copied into system temporary directory and then loaded.
|
||||
* The temporary file is deleted after
|
||||
* exiting.
|
||||
* Method uses String as filename because the pathname is "abstract", not
|
||||
* system-dependent.
|
||||
*
|
||||
* @param path The path of file inside JAR as absolute path (beginning with
|
||||
* '/'), e.g. /package/File.ext
|
||||
* @throws IOException If temporary file creation or read/write
|
||||
* operation fails
|
||||
* @throws IllegalArgumentException If source file (param path) does not exist
|
||||
* @throws IllegalArgumentException If the path is not absolute or if the
|
||||
* filename is shorter than three characters
|
||||
* (restriction of
|
||||
* {@link File#createTempFile(java.lang.String, java.lang.String)}).
|
||||
* @throws FileNotFoundException If the file could not be found inside the
|
||||
* JAR.
|
||||
*/
|
||||
public static void loadLibraryFromJar(String path) throws IOException {
|
||||
File temp = unpackLibraryFromJarInternal(path);
|
||||
|
||||
try (InputStream is = NativeUtils.class.getResourceAsStream(path)) {
|
||||
Files.copy(is, temp.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (IOException e) {
|
||||
temp.delete();
|
||||
throw e;
|
||||
} catch (NullPointerException e) {
|
||||
temp.delete();
|
||||
throw new FileNotFoundException("File " + path + " was not found inside JAR.");
|
||||
}
|
||||
|
||||
try {
|
||||
System.load(temp.getAbsolutePath());
|
||||
} finally {
|
||||
temp.deleteOnExit();
|
||||
}
|
||||
}
|
||||
|
||||
private static File createTempDirectory(String prefix) throws IOException {
|
||||
String tempDir = System.getProperty("java.io.tmpdir");
|
||||
File generatedDir = new File(tempDir, prefix + System.nanoTime());
|
||||
|
||||
if (!generatedDir.mkdir()) {
|
||||
throw new IOException("Failed to create temp directory " + generatedDir.getName());
|
||||
}
|
||||
|
||||
return generatedDir;
|
||||
}
|
||||
|
||||
public enum OSType {
|
||||
Windows, MacOS, Linux, Other
|
||||
}
|
||||
|
||||
protected static OSType detectedOS;
|
||||
|
||||
/**
|
||||
* detect the operating system from the os.name System property and cache
|
||||
* the result
|
||||
*
|
||||
* @returns - the operating system detected
|
||||
*/
|
||||
public static OSType getOperatingSystemType() {
|
||||
if (detectedOS == null) {
|
||||
String osname = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
|
||||
if ((osname.contains("mac")) || (osname.contains("darwin"))) {
|
||||
detectedOS = OSType.MacOS;
|
||||
} else if (osname.contains("win")) {
|
||||
detectedOS = OSType.Windows;
|
||||
} else if (osname.contains("nux")) {
|
||||
detectedOS = OSType.Linux;
|
||||
} else {
|
||||
detectedOS = OSType.Other;
|
||||
}
|
||||
}
|
||||
return detectedOS;
|
||||
}
|
||||
}
|
Binary file not shown.
@ -1,98 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class AlignedTableFloat32 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected AlignedTableFloat32(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(AlignedTableFloat32 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_AlignedTableFloat32(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setTab(SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t value) {
|
||||
swigfaissJNI.AlignedTableFloat32_tab_set(swigCPtr, this, SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t getTab() {
|
||||
long cPtr = swigfaissJNI.AlignedTableFloat32_tab_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__AlignedTableTightAllocT_float_32_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setNumel(long value) {
|
||||
swigfaissJNI.AlignedTableFloat32_numel_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getNumel() {
|
||||
return swigfaissJNI.AlignedTableFloat32_numel_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public static long round_capacity(long n) {
|
||||
return swigfaissJNI.AlignedTableFloat32_round_capacity(n);
|
||||
}
|
||||
|
||||
public AlignedTableFloat32() {
|
||||
this(swigfaissJNI.new_AlignedTableFloat32__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public AlignedTableFloat32(long n) {
|
||||
this(swigfaissJNI.new_AlignedTableFloat32__SWIG_1(n), true);
|
||||
}
|
||||
|
||||
public long itemsize() {
|
||||
return swigfaissJNI.AlignedTableFloat32_itemsize(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.AlignedTableFloat32_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.AlignedTableFloat32_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.AlignedTableFloat32_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public long nbytes() {
|
||||
return swigfaissJNI.AlignedTableFloat32_nbytes(swigCPtr, this);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_float get() {
|
||||
long cPtr = swigfaissJNI.AlignedTableFloat32_get__SWIG_0(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_float data() {
|
||||
long cPtr = swigfaissJNI.AlignedTableFloat32_data__SWIG_0(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,98 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class AlignedTableUint16 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected AlignedTableUint16(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(AlignedTableUint16 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_AlignedTableUint16(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setTab(SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t value) {
|
||||
swigfaissJNI.AlignedTableUint16_tab_set(swigCPtr, this, SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t getTab() {
|
||||
long cPtr = swigfaissJNI.AlignedTableUint16_tab_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__AlignedTableTightAllocT_uint16_t_32_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setNumel(long value) {
|
||||
swigfaissJNI.AlignedTableUint16_numel_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getNumel() {
|
||||
return swigfaissJNI.AlignedTableUint16_numel_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public static long round_capacity(long n) {
|
||||
return swigfaissJNI.AlignedTableUint16_round_capacity(n);
|
||||
}
|
||||
|
||||
public AlignedTableUint16() {
|
||||
this(swigfaissJNI.new_AlignedTableUint16__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public AlignedTableUint16(long n) {
|
||||
this(swigfaissJNI.new_AlignedTableUint16__SWIG_1(n), true);
|
||||
}
|
||||
|
||||
public long itemsize() {
|
||||
return swigfaissJNI.AlignedTableUint16_itemsize(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.AlignedTableUint16_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.AlignedTableUint16_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.AlignedTableUint16_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public long nbytes() {
|
||||
return swigfaissJNI.AlignedTableUint16_nbytes(swigCPtr, this);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_uint16_t get() {
|
||||
long cPtr = swigfaissJNI.AlignedTableUint16_get__SWIG_0(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_uint16_t(cPtr, false);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_uint16_t data() {
|
||||
long cPtr = swigfaissJNI.AlignedTableUint16_data__SWIG_0(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_uint16_t(cPtr, false);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,98 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class AlignedTableUint8 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected AlignedTableUint8(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(AlignedTableUint8 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_AlignedTableUint8(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setTab(SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t value) {
|
||||
swigfaissJNI.AlignedTableUint8_tab_set(swigCPtr, this, SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t getTab() {
|
||||
long cPtr = swigfaissJNI.AlignedTableUint8_tab_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__AlignedTableTightAllocT_unsigned_char_32_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setNumel(long value) {
|
||||
swigfaissJNI.AlignedTableUint8_numel_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getNumel() {
|
||||
return swigfaissJNI.AlignedTableUint8_numel_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public static long round_capacity(long n) {
|
||||
return swigfaissJNI.AlignedTableUint8_round_capacity(n);
|
||||
}
|
||||
|
||||
public AlignedTableUint8() {
|
||||
this(swigfaissJNI.new_AlignedTableUint8__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public AlignedTableUint8(long n) {
|
||||
this(swigfaissJNI.new_AlignedTableUint8__SWIG_1(n), true);
|
||||
}
|
||||
|
||||
public long itemsize() {
|
||||
return swigfaissJNI.AlignedTableUint8_itemsize(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.AlignedTableUint8_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.AlignedTableUint8_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.AlignedTableUint8_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public long nbytes() {
|
||||
return swigfaissJNI.AlignedTableUint8_nbytes(swigCPtr, this);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char get() {
|
||||
long cPtr = swigfaissJNI.AlignedTableUint8_get__SWIG_0(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char data() {
|
||||
long cPtr = swigfaissJNI.AlignedTableUint8_data__SWIG_0(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,86 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class ArrayInvertedLists extends InvertedLists {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected ArrayInvertedLists(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.ArrayInvertedLists_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ArrayInvertedLists obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_ArrayInvertedLists(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setCodes(ByteVectorVector value) {
|
||||
swigfaissJNI.ArrayInvertedLists_codes_set(swigCPtr, this, ByteVectorVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public ByteVectorVector getCodes() {
|
||||
long cPtr = swigfaissJNI.ArrayInvertedLists_codes_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new ByteVectorVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setIds(SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t value) {
|
||||
swigfaissJNI.ArrayInvertedLists_ids_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t getIds() {
|
||||
long cPtr = swigfaissJNI.ArrayInvertedLists_ids_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_std__vectorT_int64_t_t_t(cPtr, false);
|
||||
}
|
||||
|
||||
public ArrayInvertedLists(long nlist, long code_size) {
|
||||
this(swigfaissJNI.new_ArrayInvertedLists(nlist, code_size), true);
|
||||
}
|
||||
|
||||
public long list_size(long list_no) {
|
||||
return swigfaissJNI.ArrayInvertedLists_list_size(swigCPtr, this, list_no);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char get_codes(long list_no) {
|
||||
long cPtr = swigfaissJNI.ArrayInvertedLists_get_codes(swigCPtr, this, list_no);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
public LongVector get_ids(long list_no) {
|
||||
return new LongVector(swigfaissJNI.ArrayInvertedLists_get_ids(swigCPtr, this, list_no), false);
|
||||
}
|
||||
|
||||
public long add_entries(long list_no, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
|
||||
return swigfaissJNI.ArrayInvertedLists_add_entries(swigCPtr, this, list_no, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
|
||||
}
|
||||
|
||||
public void update_entries(long list_no, long offset, long n_entry, LongVector ids, SWIGTYPE_p_unsigned_char code) {
|
||||
swigfaissJNI.ArrayInvertedLists_update_entries(swigCPtr, this, list_no, offset, n_entry, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids, SWIGTYPE_p_unsigned_char.getCPtr(code));
|
||||
}
|
||||
|
||||
public void resize(long list_no, long new_size) {
|
||||
swigfaissJNI.ArrayInvertedLists_resize(swigCPtr, this, list_no, new_size);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,89 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class AutoTuneCriterion {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected AutoTuneCriterion(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(AutoTuneCriterion obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_AutoTuneCriterion(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setNq(long value) {
|
||||
swigfaissJNI.AutoTuneCriterion_nq_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getNq() {
|
||||
return swigfaissJNI.AutoTuneCriterion_nq_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setNnn(long value) {
|
||||
swigfaissJNI.AutoTuneCriterion_nnn_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getNnn() {
|
||||
return swigfaissJNI.AutoTuneCriterion_nnn_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setGt_nnn(long value) {
|
||||
swigfaissJNI.AutoTuneCriterion_gt_nnn_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getGt_nnn() {
|
||||
return swigfaissJNI.AutoTuneCriterion_gt_nnn_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setGt_D(FloatVector value) {
|
||||
swigfaissJNI.AutoTuneCriterion_gt_D_set(swigCPtr, this, FloatVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public FloatVector getGt_D() {
|
||||
long cPtr = swigfaissJNI.AutoTuneCriterion_gt_D_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setGt_I(SWIGTYPE_p_std__vectorT_int64_t_t value) {
|
||||
swigfaissJNI.AutoTuneCriterion_gt_I_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_int64_t_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__vectorT_int64_t_t getGt_I() {
|
||||
long cPtr = swigfaissJNI.AutoTuneCriterion_gt_I_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_int64_t_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void set_groundtruth(int gt_nnn, SWIGTYPE_p_float gt_D_in, LongVector gt_I_in) {
|
||||
swigfaissJNI.AutoTuneCriterion_set_groundtruth(swigCPtr, this, gt_nnn, SWIGTYPE_p_float.getCPtr(gt_D_in), SWIGTYPE_p_long_long.getCPtr(gt_I_in.data()), gt_I_in);
|
||||
}
|
||||
|
||||
public double evaluate(SWIGTYPE_p_float D, LongVector I) {
|
||||
return swigfaissJNI.AutoTuneCriterion_evaluate(swigCPtr, this, SWIGTYPE_p_float.getCPtr(D), SWIGTYPE_p_long_long.getCPtr(I.data()), I);
|
||||
}
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
java_library(
|
||||
name = "swig-local",
|
||||
sources = ["*.java"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
tags = [
|
||||
"bazel-compatible",
|
||||
"bazel-only",
|
||||
],
|
||||
dependencies = [
|
||||
"ann/src/main/java/com/twitter/ann/faiss:swig-native-utils",
|
||||
"ann/src/main/java/com/twitter/ann/faiss/swig/resources",
|
||||
],
|
||||
)
|
||||
|
||||
java_library(
|
||||
name = "swig-artifactory",
|
||||
sources = ["*.java"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [
|
||||
"3rdparty/jvm/com/twitter/ann/faiss/swig:resources",
|
||||
"ann/src/main/java/com/twitter/ann/faiss:swig-native-utils",
|
||||
],
|
||||
)
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/BUILD.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/BUILD.docx
Normal file
Binary file not shown.
Binary file not shown.
@ -1,72 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class BitstringReader {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected BitstringReader(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(BitstringReader obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_BitstringReader(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setCode(SWIGTYPE_p_unsigned_char value) {
|
||||
swigfaissJNI.BitstringReader_code_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char getCode() {
|
||||
long cPtr = swigfaissJNI.BitstringReader_code_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
public void setCode_size(long value) {
|
||||
swigfaissJNI.BitstringReader_code_size_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getCode_size() {
|
||||
return swigfaissJNI.BitstringReader_code_size_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setI(long value) {
|
||||
swigfaissJNI.BitstringReader_i_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getI() {
|
||||
return swigfaissJNI.BitstringReader_i_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public BitstringReader(SWIGTYPE_p_unsigned_char code, long code_size) {
|
||||
this(swigfaissJNI.new_BitstringReader(SWIGTYPE_p_unsigned_char.getCPtr(code), code_size), true);
|
||||
}
|
||||
|
||||
public long read(int nbit) {
|
||||
return swigfaissJNI.BitstringReader_read(swigCPtr, this, nbit);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,72 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class BitstringWriter {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected BitstringWriter(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(BitstringWriter obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_BitstringWriter(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setCode(SWIGTYPE_p_unsigned_char value) {
|
||||
swigfaissJNI.BitstringWriter_code_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char getCode() {
|
||||
long cPtr = swigfaissJNI.BitstringWriter_code_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
public void setCode_size(long value) {
|
||||
swigfaissJNI.BitstringWriter_code_size_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getCode_size() {
|
||||
return swigfaissJNI.BitstringWriter_code_size_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setI(long value) {
|
||||
swigfaissJNI.BitstringWriter_i_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getI() {
|
||||
return swigfaissJNI.BitstringWriter_i_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public BitstringWriter(SWIGTYPE_p_unsigned_char code, long code_size) {
|
||||
this(swigfaissJNI.new_BitstringWriter(SWIGTYPE_p_unsigned_char.getCPtr(code), code_size), true);
|
||||
}
|
||||
|
||||
public void write(long x, int nbit) {
|
||||
swigfaissJNI.BitstringWriter_write(swigCPtr, this, x, nbit);
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/BufferList.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/BufferList.docx
Normal file
Binary file not shown.
@ -1,80 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class BufferList {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected BufferList(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(BufferList obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_BufferList(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setBuffer_size(long value) {
|
||||
swigfaissJNI.BufferList_buffer_size_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getBuffer_size() {
|
||||
return swigfaissJNI.BufferList_buffer_size_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setBuffers(SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t value) {
|
||||
swigfaissJNI.BufferList_buffers_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t getBuffers() {
|
||||
long cPtr = swigfaissJNI.BufferList_buffers_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setWp(long value) {
|
||||
swigfaissJNI.BufferList_wp_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getWp() {
|
||||
return swigfaissJNI.BufferList_wp_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public BufferList(long buffer_size) {
|
||||
this(swigfaissJNI.new_BufferList(buffer_size), true);
|
||||
}
|
||||
|
||||
public void append_buffer() {
|
||||
swigfaissJNI.BufferList_append_buffer(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void add(long id, float dis) {
|
||||
swigfaissJNI.BufferList_add(swigCPtr, this, id, dis);
|
||||
}
|
||||
|
||||
public void copy_range(long ofs, long n, LongVector dest_ids, SWIGTYPE_p_float dest_dis) {
|
||||
swigfaissJNI.BufferList_copy_range(swigCPtr, this, ofs, n, SWIGTYPE_p_long_long.getCPtr(dest_ids.data()), dest_ids, SWIGTYPE_p_float.getCPtr(dest_dis));
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/ByteVector.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/ByteVector.docx
Normal file
Binary file not shown.
@ -1,76 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class ByteVector {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ByteVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ByteVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_ByteVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ByteVector() {
|
||||
this(swigfaissJNI.new_ByteVector(), true);
|
||||
}
|
||||
|
||||
public void push_back(short arg0) {
|
||||
swigfaissJNI.ByteVector_push_back(swigCPtr, this, arg0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.ByteVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char data() {
|
||||
long cPtr = swigfaissJNI.ByteVector_data(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.ByteVector_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public short at(long n) {
|
||||
return swigfaissJNI.ByteVector_at(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.ByteVector_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
swigfaissJNI.ByteVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void swap(ByteVector other) {
|
||||
swigfaissJNI.ByteVector_swap(swigCPtr, this, ByteVector.getCPtr(other), other);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,76 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class ByteVectorVector {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ByteVectorVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ByteVectorVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_ByteVectorVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public ByteVectorVector() {
|
||||
this(swigfaissJNI.new_ByteVectorVector(), true);
|
||||
}
|
||||
|
||||
public void push_back(ByteVector arg0) {
|
||||
swigfaissJNI.ByteVectorVector_push_back(swigCPtr, this, ByteVector.getCPtr(arg0), arg0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.ByteVectorVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ByteVector data() {
|
||||
long cPtr = swigfaissJNI.ByteVectorVector_data(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new ByteVector(cPtr, false);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.ByteVectorVector_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ByteVector at(long n) {
|
||||
return new ByteVector(swigfaissJNI.ByteVectorVector_at(swigCPtr, this, n), true);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.ByteVectorVector_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
swigfaissJNI.ByteVectorVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void swap(ByteVectorVector other) {
|
||||
swigfaissJNI.ByteVectorVector_swap(swigCPtr, this, ByteVectorVector.getCPtr(other), other);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,68 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class CenteringTransform extends VectorTransform {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected CenteringTransform(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.CenteringTransform_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(CenteringTransform obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_CenteringTransform(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setMean(FloatVector value) {
|
||||
swigfaissJNI.CenteringTransform_mean_set(swigCPtr, this, FloatVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public FloatVector getMean() {
|
||||
long cPtr = swigfaissJNI.CenteringTransform_mean_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
|
||||
}
|
||||
|
||||
public CenteringTransform(int d) {
|
||||
this(swigfaissJNI.new_CenteringTransform__SWIG_0(d), true);
|
||||
}
|
||||
|
||||
public CenteringTransform() {
|
||||
this(swigfaissJNI.new_CenteringTransform__SWIG_1(), true);
|
||||
}
|
||||
|
||||
public void train(long n, SWIGTYPE_p_float x) {
|
||||
swigfaissJNI.CenteringTransform_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
|
||||
}
|
||||
|
||||
public void apply_noalloc(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float xt) {
|
||||
swigfaissJNI.CenteringTransform_apply_noalloc(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(xt));
|
||||
}
|
||||
|
||||
public void reverse_transform(long n, SWIGTYPE_p_float xt, SWIGTYPE_p_float x) {
|
||||
swigfaissJNI.CenteringTransform_reverse_transform(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(xt), SWIGTYPE_p_float.getCPtr(x));
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/CharVector.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/CharVector.docx
Normal file
Binary file not shown.
@ -1,75 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class CharVector {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected CharVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(CharVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_CharVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public CharVector() {
|
||||
this(swigfaissJNI.new_CharVector(), true);
|
||||
}
|
||||
|
||||
public void push_back(char arg0) {
|
||||
swigfaissJNI.CharVector_push_back(swigCPtr, this, arg0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.CharVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public String data() {
|
||||
return swigfaissJNI.CharVector_data(swigCPtr, this);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.CharVector_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public char at(long n) {
|
||||
return swigfaissJNI.CharVector_at(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.CharVector_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
swigfaissJNI.CharVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void swap(CharVector other) {
|
||||
swigfaissJNI.CharVector_swap(swigCPtr, this, CharVector.getCPtr(other), other);
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/Clustering.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/Clustering.docx
Normal file
Binary file not shown.
@ -1,101 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class Clustering extends ClusteringParameters {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected Clustering(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.Clustering_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(Clustering obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_Clustering(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setD(long value) {
|
||||
swigfaissJNI.Clustering_d_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getD() {
|
||||
return swigfaissJNI.Clustering_d_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setK(long value) {
|
||||
swigfaissJNI.Clustering_k_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getK() {
|
||||
return swigfaissJNI.Clustering_k_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setCentroids(FloatVector value) {
|
||||
swigfaissJNI.Clustering_centroids_set(swigCPtr, this, FloatVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public FloatVector getCentroids() {
|
||||
long cPtr = swigfaissJNI.Clustering_centroids_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setIteration_stats(SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t value) {
|
||||
swigfaissJNI.Clustering_iteration_stats_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t getIteration_stats() {
|
||||
long cPtr = swigfaissJNI.Clustering_iteration_stats_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__ClusteringIterationStats_t(cPtr, false);
|
||||
}
|
||||
|
||||
public Clustering(int d, int k) {
|
||||
this(swigfaissJNI.new_Clustering__SWIG_0(d, k), true);
|
||||
}
|
||||
|
||||
public Clustering(int d, int k, ClusteringParameters cp) {
|
||||
this(swigfaissJNI.new_Clustering__SWIG_1(d, k, ClusteringParameters.getCPtr(cp), cp), true);
|
||||
}
|
||||
|
||||
public void train(long n, SWIGTYPE_p_float x, Index index, SWIGTYPE_p_float x_weights) {
|
||||
swigfaissJNI.Clustering_train__SWIG_0(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), Index.getCPtr(index), index, SWIGTYPE_p_float.getCPtr(x_weights));
|
||||
}
|
||||
|
||||
public void train(long n, SWIGTYPE_p_float x, Index index) {
|
||||
swigfaissJNI.Clustering_train__SWIG_1(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), Index.getCPtr(index), index);
|
||||
}
|
||||
|
||||
public void train_encoded(long nx, SWIGTYPE_p_unsigned_char x_in, Index codec, Index index, SWIGTYPE_p_float weights) {
|
||||
swigfaissJNI.Clustering_train_encoded__SWIG_0(swigCPtr, this, nx, SWIGTYPE_p_unsigned_char.getCPtr(x_in), Index.getCPtr(codec), codec, Index.getCPtr(index), index, SWIGTYPE_p_float.getCPtr(weights));
|
||||
}
|
||||
|
||||
public void train_encoded(long nx, SWIGTYPE_p_unsigned_char x_in, Index codec, Index index) {
|
||||
swigfaissJNI.Clustering_train_encoded__SWIG_1(swigCPtr, this, nx, SWIGTYPE_p_unsigned_char.getCPtr(x_in), Index.getCPtr(codec), codec, Index.getCPtr(index), index);
|
||||
}
|
||||
|
||||
public void post_process_centroids() {
|
||||
swigfaissJNI.Clustering_post_process_centroids(swigCPtr, this);
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/Clustering1D.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/Clustering1D.docx
Normal file
Binary file not shown.
@ -1,51 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class Clustering1D extends Clustering {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected Clustering1D(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.Clustering1D_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(Clustering1D obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_Clustering1D(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public Clustering1D(int k) {
|
||||
this(swigfaissJNI.new_Clustering1D__SWIG_0(k), true);
|
||||
}
|
||||
|
||||
public Clustering1D(int k, ClusteringParameters cp) {
|
||||
this(swigfaissJNI.new_Clustering1D__SWIG_1(k, ClusteringParameters.getCPtr(cp), cp), true);
|
||||
}
|
||||
|
||||
public void train_exact(long n, SWIGTYPE_p_float x) {
|
||||
swigfaissJNI.Clustering1D_train_exact(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,83 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class ClusteringIterationStats {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClusteringIterationStats(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClusteringIterationStats obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_ClusteringIterationStats(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setObj(float value) {
|
||||
swigfaissJNI.ClusteringIterationStats_obj_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public float getObj() {
|
||||
return swigfaissJNI.ClusteringIterationStats_obj_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTime(double value) {
|
||||
swigfaissJNI.ClusteringIterationStats_time_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public double getTime() {
|
||||
return swigfaissJNI.ClusteringIterationStats_time_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setTime_search(double value) {
|
||||
swigfaissJNI.ClusteringIterationStats_time_search_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public double getTime_search() {
|
||||
return swigfaissJNI.ClusteringIterationStats_time_search_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setImbalance_factor(double value) {
|
||||
swigfaissJNI.ClusteringIterationStats_imbalance_factor_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public double getImbalance_factor() {
|
||||
return swigfaissJNI.ClusteringIterationStats_imbalance_factor_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setNsplit(int value) {
|
||||
swigfaissJNI.ClusteringIterationStats_nsplit_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getNsplit() {
|
||||
return swigfaissJNI.ClusteringIterationStats_nsplit_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClusteringIterationStats() {
|
||||
this(swigfaissJNI.new_ClusteringIterationStats(), true);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,131 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class ClusteringParameters {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected ClusteringParameters(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ClusteringParameters obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_ClusteringParameters(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setNiter(int value) {
|
||||
swigfaissJNI.ClusteringParameters_niter_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getNiter() {
|
||||
return swigfaissJNI.ClusteringParameters_niter_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setNredo(int value) {
|
||||
swigfaissJNI.ClusteringParameters_nredo_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getNredo() {
|
||||
return swigfaissJNI.ClusteringParameters_nredo_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setVerbose(boolean value) {
|
||||
swigfaissJNI.ClusteringParameters_verbose_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getVerbose() {
|
||||
return swigfaissJNI.ClusteringParameters_verbose_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSpherical(boolean value) {
|
||||
swigfaissJNI.ClusteringParameters_spherical_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getSpherical() {
|
||||
return swigfaissJNI.ClusteringParameters_spherical_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setInt_centroids(boolean value) {
|
||||
swigfaissJNI.ClusteringParameters_int_centroids_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getInt_centroids() {
|
||||
return swigfaissJNI.ClusteringParameters_int_centroids_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setUpdate_index(boolean value) {
|
||||
swigfaissJNI.ClusteringParameters_update_index_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getUpdate_index() {
|
||||
return swigfaissJNI.ClusteringParameters_update_index_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setFrozen_centroids(boolean value) {
|
||||
swigfaissJNI.ClusteringParameters_frozen_centroids_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getFrozen_centroids() {
|
||||
return swigfaissJNI.ClusteringParameters_frozen_centroids_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setMin_points_per_centroid(int value) {
|
||||
swigfaissJNI.ClusteringParameters_min_points_per_centroid_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getMin_points_per_centroid() {
|
||||
return swigfaissJNI.ClusteringParameters_min_points_per_centroid_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setMax_points_per_centroid(int value) {
|
||||
swigfaissJNI.ClusteringParameters_max_points_per_centroid_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getMax_points_per_centroid() {
|
||||
return swigfaissJNI.ClusteringParameters_max_points_per_centroid_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSeed(int value) {
|
||||
swigfaissJNI.ClusteringParameters_seed_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getSeed() {
|
||||
return swigfaissJNI.ClusteringParameters_seed_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setDecode_block_size(long value) {
|
||||
swigfaissJNI.ClusteringParameters_decode_block_size_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getDecode_block_size() {
|
||||
return swigfaissJNI.ClusteringParameters_decode_block_size_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public ClusteringParameters() {
|
||||
this(swigfaissJNI.new_ClusteringParameters(), true);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,47 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class DistanceComputer {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected DistanceComputer(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(DistanceComputer obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_DistanceComputer(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void set_query(SWIGTYPE_p_float x) {
|
||||
swigfaissJNI.DistanceComputer_set_query(swigCPtr, this, SWIGTYPE_p_float.getCPtr(x));
|
||||
}
|
||||
|
||||
public float symmetric_dis(long i, long j) {
|
||||
return swigfaissJNI.DistanceComputer_symmetric_dis(swigCPtr, this, i, j);
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/DoubleVector.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/DoubleVector.docx
Normal file
Binary file not shown.
@ -1,76 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class DoubleVector {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected DoubleVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(DoubleVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_DoubleVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public DoubleVector() {
|
||||
this(swigfaissJNI.new_DoubleVector(), true);
|
||||
}
|
||||
|
||||
public void push_back(double arg0) {
|
||||
swigfaissJNI.DoubleVector_push_back(swigCPtr, this, arg0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.DoubleVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_double data() {
|
||||
long cPtr = swigfaissJNI.DoubleVector_data(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_double(cPtr, false);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.DoubleVector_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public double at(long n) {
|
||||
return swigfaissJNI.DoubleVector_at(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.DoubleVector_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
swigfaissJNI.DoubleVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void swap(DoubleVector other) {
|
||||
swigfaissJNI.DoubleVector_swap(swigCPtr, this, DoubleVector.getCPtr(other), other);
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/FloatVector.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/FloatVector.docx
Normal file
Binary file not shown.
@ -1,76 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class FloatVector {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected FloatVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(FloatVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_FloatVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public FloatVector() {
|
||||
this(swigfaissJNI.new_FloatVector(), true);
|
||||
}
|
||||
|
||||
public void push_back(float arg0) {
|
||||
swigfaissJNI.FloatVector_push_back(swigCPtr, this, arg0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.FloatVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_float data() {
|
||||
long cPtr = swigfaissJNI.FloatVector_data(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.FloatVector_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public float at(long n) {
|
||||
return swigfaissJNI.FloatVector_at(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.FloatVector_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
swigfaissJNI.FloatVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void swap(FloatVector other) {
|
||||
swigfaissJNI.FloatVector_swap(swigCPtr, this, FloatVector.getCPtr(other), other);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,76 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class FloatVectorVector {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected FloatVectorVector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(FloatVectorVector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_FloatVectorVector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public FloatVectorVector() {
|
||||
this(swigfaissJNI.new_FloatVectorVector(), true);
|
||||
}
|
||||
|
||||
public void push_back(FloatVector arg0) {
|
||||
swigfaissJNI.FloatVectorVector_push_back(swigCPtr, this, FloatVector.getCPtr(arg0), arg0);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.FloatVectorVector_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public FloatVector data() {
|
||||
long cPtr = swigfaissJNI.FloatVectorVector_data(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
|
||||
}
|
||||
|
||||
public long size() {
|
||||
return swigfaissJNI.FloatVectorVector_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public FloatVector at(long n) {
|
||||
return new FloatVector(swigfaissJNI.FloatVectorVector_at(swigCPtr, this, n), true);
|
||||
}
|
||||
|
||||
public void resize(long n) {
|
||||
swigfaissJNI.FloatVectorVector_resize(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void reserve(long n) {
|
||||
swigfaissJNI.FloatVectorVector_reserve(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void swap(FloatVectorVector other) {
|
||||
swigfaissJNI.FloatVectorVector_swap(swigCPtr, this, FloatVectorVector.getCPtr(other), other);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,63 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class GenHammingComputer16 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected GenHammingComputer16(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(GenHammingComputer16 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_GenHammingComputer16(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.GenHammingComputer16_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.GenHammingComputer16_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA1(long value) {
|
||||
swigfaissJNI.GenHammingComputer16_a1_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA1() {
|
||||
return swigfaissJNI.GenHammingComputer16_a1_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public GenHammingComputer16(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_GenHammingComputer16(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.GenHammingComputer16_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,79 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class GenHammingComputer32 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected GenHammingComputer32(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(GenHammingComputer32 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_GenHammingComputer32(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.GenHammingComputer32_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.GenHammingComputer32_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA1(long value) {
|
||||
swigfaissJNI.GenHammingComputer32_a1_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA1() {
|
||||
return swigfaissJNI.GenHammingComputer32_a1_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA2(long value) {
|
||||
swigfaissJNI.GenHammingComputer32_a2_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA2() {
|
||||
return swigfaissJNI.GenHammingComputer32_a2_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA3(long value) {
|
||||
swigfaissJNI.GenHammingComputer32_a3_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA3() {
|
||||
return swigfaissJNI.GenHammingComputer32_a3_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public GenHammingComputer32(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_GenHammingComputer32(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.GenHammingComputer32_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,55 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class GenHammingComputer8 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected GenHammingComputer8(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(GenHammingComputer8 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_GenHammingComputer8(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.GenHammingComputer8_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.GenHammingComputer8_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public GenHammingComputer8(SWIGTYPE_p_unsigned_char a, int code_size) {
|
||||
this(swigfaissJNI.new_GenHammingComputer8(SWIGTYPE_p_unsigned_char.getCPtr(a), code_size), true);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b) {
|
||||
return swigfaissJNI.GenHammingComputer8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,64 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class GenHammingComputerM8 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected GenHammingComputerM8(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(GenHammingComputerM8 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_GenHammingComputerM8(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA(SWIGTYPE_p_unsigned_long value) {
|
||||
swigfaissJNI.GenHammingComputerM8_a_set(swigCPtr, this, SWIGTYPE_p_unsigned_long.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_long getA() {
|
||||
long cPtr = swigfaissJNI.GenHammingComputerM8_a_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_long(cPtr, false);
|
||||
}
|
||||
|
||||
public void setN(int value) {
|
||||
swigfaissJNI.GenHammingComputerM8_n_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getN() {
|
||||
return swigfaissJNI.GenHammingComputerM8_n_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public GenHammingComputerM8(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_GenHammingComputerM8(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.GenHammingComputerM8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/HNSW.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/HNSW.docx
Normal file
Binary file not shown.
@ -1,437 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HNSW {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HNSW(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HNSW obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HNSW(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static public class MinimaxHeap {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected MinimaxHeap(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(MinimaxHeap obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HNSW_MinimaxHeap(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setN(int value) {
|
||||
swigfaissJNI.HNSW_MinimaxHeap_n_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getN() {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_n_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setK(int value) {
|
||||
swigfaissJNI.HNSW_MinimaxHeap_k_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getK() {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_k_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setNvalid(int value) {
|
||||
swigfaissJNI.HNSW_MinimaxHeap_nvalid_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getNvalid() {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_nvalid_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setIds(IntVector value) {
|
||||
swigfaissJNI.HNSW_MinimaxHeap_ids_set(swigCPtr, this, IntVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public IntVector getIds() {
|
||||
long cPtr = swigfaissJNI.HNSW_MinimaxHeap_ids_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new IntVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setDis(FloatVector value) {
|
||||
swigfaissJNI.HNSW_MinimaxHeap_dis_set(swigCPtr, this, FloatVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public FloatVector getDis() {
|
||||
long cPtr = swigfaissJNI.HNSW_MinimaxHeap_dis_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
|
||||
}
|
||||
|
||||
public MinimaxHeap(int n) {
|
||||
this(swigfaissJNI.new_HNSW_MinimaxHeap(n), true);
|
||||
}
|
||||
|
||||
public void push(int i, float v) {
|
||||
swigfaissJNI.HNSW_MinimaxHeap_push(swigCPtr, this, i, v);
|
||||
}
|
||||
|
||||
public float max() {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_max(swigCPtr, this);
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_size(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
swigfaissJNI.HNSW_MinimaxHeap_clear(swigCPtr, this);
|
||||
}
|
||||
|
||||
public int pop_min(SWIGTYPE_p_float vmin_out) {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_pop_min__SWIG_0(swigCPtr, this, SWIGTYPE_p_float.getCPtr(vmin_out));
|
||||
}
|
||||
|
||||
public int pop_min() {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_pop_min__SWIG_1(swigCPtr, this);
|
||||
}
|
||||
|
||||
public int count_below(float thresh) {
|
||||
return swigfaissJNI.HNSW_MinimaxHeap_count_below(swigCPtr, this, thresh);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static public class NodeDistCloser {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected NodeDistCloser(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(NodeDistCloser obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HNSW_NodeDistCloser(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setD(float value) {
|
||||
swigfaissJNI.HNSW_NodeDistCloser_d_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public float getD() {
|
||||
return swigfaissJNI.HNSW_NodeDistCloser_d_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setId(int value) {
|
||||
swigfaissJNI.HNSW_NodeDistCloser_id_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return swigfaissJNI.HNSW_NodeDistCloser_id_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public NodeDistCloser(float d, int id) {
|
||||
this(swigfaissJNI.new_HNSW_NodeDistCloser(d, id), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static public class NodeDistFarther {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected NodeDistFarther(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(NodeDistFarther obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HNSW_NodeDistFarther(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setD(float value) {
|
||||
swigfaissJNI.HNSW_NodeDistFarther_d_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public float getD() {
|
||||
return swigfaissJNI.HNSW_NodeDistFarther_d_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setId(int value) {
|
||||
swigfaissJNI.HNSW_NodeDistFarther_id_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return swigfaissJNI.HNSW_NodeDistFarther_id_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public NodeDistFarther(float d, int id) {
|
||||
this(swigfaissJNI.new_HNSW_NodeDistFarther(d, id), true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setAssign_probas(DoubleVector value) {
|
||||
swigfaissJNI.HNSW_assign_probas_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public DoubleVector getAssign_probas() {
|
||||
long cPtr = swigfaissJNI.HNSW_assign_probas_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setCum_nneighbor_per_level(IntVector value) {
|
||||
swigfaissJNI.HNSW_cum_nneighbor_per_level_set(swigCPtr, this, IntVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public IntVector getCum_nneighbor_per_level() {
|
||||
long cPtr = swigfaissJNI.HNSW_cum_nneighbor_per_level_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new IntVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setLevels(IntVector value) {
|
||||
swigfaissJNI.HNSW_levels_set(swigCPtr, this, IntVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public IntVector getLevels() {
|
||||
long cPtr = swigfaissJNI.HNSW_levels_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new IntVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setOffsets(Uint64Vector value) {
|
||||
swigfaissJNI.HNSW_offsets_set(swigCPtr, this, Uint64Vector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public Uint64Vector getOffsets() {
|
||||
long cPtr = swigfaissJNI.HNSW_offsets_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new Uint64Vector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setNeighbors(IntVector value) {
|
||||
swigfaissJNI.HNSW_neighbors_set(swigCPtr, this, IntVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public IntVector getNeighbors() {
|
||||
long cPtr = swigfaissJNI.HNSW_neighbors_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new IntVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setEntry_point(int value) {
|
||||
swigfaissJNI.HNSW_entry_point_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getEntry_point() {
|
||||
return swigfaissJNI.HNSW_entry_point_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setRng(SWIGTYPE_p_faiss__RandomGenerator value) {
|
||||
swigfaissJNI.HNSW_rng_set(swigCPtr, this, SWIGTYPE_p_faiss__RandomGenerator.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_faiss__RandomGenerator getRng() {
|
||||
long cPtr = swigfaissJNI.HNSW_rng_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_faiss__RandomGenerator(cPtr, false);
|
||||
}
|
||||
|
||||
public void setMax_level(int value) {
|
||||
swigfaissJNI.HNSW_max_level_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getMax_level() {
|
||||
return swigfaissJNI.HNSW_max_level_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setEfConstruction(int value) {
|
||||
swigfaissJNI.HNSW_efConstruction_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getEfConstruction() {
|
||||
return swigfaissJNI.HNSW_efConstruction_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setEfSearch(int value) {
|
||||
swigfaissJNI.HNSW_efSearch_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getEfSearch() {
|
||||
return swigfaissJNI.HNSW_efSearch_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setCheck_relative_distance(boolean value) {
|
||||
swigfaissJNI.HNSW_check_relative_distance_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getCheck_relative_distance() {
|
||||
return swigfaissJNI.HNSW_check_relative_distance_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setUpper_beam(int value) {
|
||||
swigfaissJNI.HNSW_upper_beam_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getUpper_beam() {
|
||||
return swigfaissJNI.HNSW_upper_beam_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSearch_bounded_queue(boolean value) {
|
||||
swigfaissJNI.HNSW_search_bounded_queue_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getSearch_bounded_queue() {
|
||||
return swigfaissJNI.HNSW_search_bounded_queue_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void set_default_probas(int M, float levelMult) {
|
||||
swigfaissJNI.HNSW_set_default_probas(swigCPtr, this, M, levelMult);
|
||||
}
|
||||
|
||||
public void set_nb_neighbors(int level_no, int n) {
|
||||
swigfaissJNI.HNSW_set_nb_neighbors(swigCPtr, this, level_no, n);
|
||||
}
|
||||
|
||||
public int nb_neighbors(int layer_no) {
|
||||
return swigfaissJNI.HNSW_nb_neighbors(swigCPtr, this, layer_no);
|
||||
}
|
||||
|
||||
public int cum_nb_neighbors(int layer_no) {
|
||||
return swigfaissJNI.HNSW_cum_nb_neighbors(swigCPtr, this, layer_no);
|
||||
}
|
||||
|
||||
public void neighbor_range(long no, int layer_no, SWIGTYPE_p_unsigned_long begin, SWIGTYPE_p_unsigned_long end) {
|
||||
swigfaissJNI.HNSW_neighbor_range(swigCPtr, this, no, layer_no, SWIGTYPE_p_unsigned_long.getCPtr(begin), SWIGTYPE_p_unsigned_long.getCPtr(end));
|
||||
}
|
||||
|
||||
public HNSW(int M) {
|
||||
this(swigfaissJNI.new_HNSW__SWIG_0(M), true);
|
||||
}
|
||||
|
||||
public HNSW() {
|
||||
this(swigfaissJNI.new_HNSW__SWIG_1(), true);
|
||||
}
|
||||
|
||||
public int random_level() {
|
||||
return swigfaissJNI.HNSW_random_level(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void fill_with_random_links(long n) {
|
||||
swigfaissJNI.HNSW_fill_with_random_links(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public void add_links_starting_from(DistanceComputer ptdis, int pt_id, int nearest, float d_nearest, int level, SWIGTYPE_p_omp_lock_t locks, VisitedTable vt) {
|
||||
swigfaissJNI.HNSW_add_links_starting_from(swigCPtr, this, DistanceComputer.getCPtr(ptdis), ptdis, pt_id, nearest, d_nearest, level, SWIGTYPE_p_omp_lock_t.getCPtr(locks), VisitedTable.getCPtr(vt), vt);
|
||||
}
|
||||
|
||||
public void add_with_locks(DistanceComputer ptdis, int pt_level, int pt_id, SWIGTYPE_p_std__vectorT_omp_lock_t_t locks, VisitedTable vt) {
|
||||
swigfaissJNI.HNSW_add_with_locks(swigCPtr, this, DistanceComputer.getCPtr(ptdis), ptdis, pt_level, pt_id, SWIGTYPE_p_std__vectorT_omp_lock_t_t.getCPtr(locks), VisitedTable.getCPtr(vt), vt);
|
||||
}
|
||||
|
||||
public int search_from_candidates(DistanceComputer qdis, int k, LongVector I, SWIGTYPE_p_float D, HNSW.MinimaxHeap candidates, VisitedTable vt, HNSWStats stats, int level, int nres_in) {
|
||||
return swigfaissJNI.HNSW_search_from_candidates__SWIG_0(swigCPtr, this, DistanceComputer.getCPtr(qdis), qdis, k, SWIGTYPE_p_long_long.getCPtr(I.data()), I, SWIGTYPE_p_float.getCPtr(D), HNSW.MinimaxHeap.getCPtr(candidates), candidates, VisitedTable.getCPtr(vt), vt, HNSWStats.getCPtr(stats), stats, level, nres_in);
|
||||
}
|
||||
|
||||
public int search_from_candidates(DistanceComputer qdis, int k, LongVector I, SWIGTYPE_p_float D, HNSW.MinimaxHeap candidates, VisitedTable vt, HNSWStats stats, int level) {
|
||||
return swigfaissJNI.HNSW_search_from_candidates__SWIG_1(swigCPtr, this, DistanceComputer.getCPtr(qdis), qdis, k, SWIGTYPE_p_long_long.getCPtr(I.data()), I, SWIGTYPE_p_float.getCPtr(D), HNSW.MinimaxHeap.getCPtr(candidates), candidates, VisitedTable.getCPtr(vt), vt, HNSWStats.getCPtr(stats), stats, level);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t search_from_candidate_unbounded(SWIGTYPE_p_std__pairT_float_int_t node, DistanceComputer qdis, int ef, VisitedTable vt, HNSWStats stats) {
|
||||
return new SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t(swigfaissJNI.HNSW_search_from_candidate_unbounded(swigCPtr, this, SWIGTYPE_p_std__pairT_float_int_t.getCPtr(node), DistanceComputer.getCPtr(qdis), qdis, ef, VisitedTable.getCPtr(vt), vt, HNSWStats.getCPtr(stats), stats), true);
|
||||
}
|
||||
|
||||
public HNSWStats search(DistanceComputer qdis, int k, LongVector I, SWIGTYPE_p_float D, VisitedTable vt) {
|
||||
return new HNSWStats(swigfaissJNI.HNSW_search(swigCPtr, this, DistanceComputer.getCPtr(qdis), qdis, k, SWIGTYPE_p_long_long.getCPtr(I.data()), I, SWIGTYPE_p_float.getCPtr(D), VisitedTable.getCPtr(vt), vt), true);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
swigfaissJNI.HNSW_reset(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void clear_neighbor_tables(int level) {
|
||||
swigfaissJNI.HNSW_clear_neighbor_tables(swigCPtr, this, level);
|
||||
}
|
||||
|
||||
public void print_neighbor_stats(int level) {
|
||||
swigfaissJNI.HNSW_print_neighbor_stats(swigCPtr, this, level);
|
||||
}
|
||||
|
||||
public int prepare_level_tab(long n, boolean preset_levels) {
|
||||
return swigfaissJNI.HNSW_prepare_level_tab__SWIG_0(swigCPtr, this, n, preset_levels);
|
||||
}
|
||||
|
||||
public int prepare_level_tab(long n) {
|
||||
return swigfaissJNI.HNSW_prepare_level_tab__SWIG_1(swigCPtr, this, n);
|
||||
}
|
||||
|
||||
public static void shrink_neighbor_list(DistanceComputer qdis, SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t input, SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t output, int max_size) {
|
||||
swigfaissJNI.HNSW_shrink_neighbor_list(DistanceComputer.getCPtr(qdis), qdis, SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t.getCPtr(input), SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t.getCPtr(output), max_size);
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/HNSWStats.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/HNSWStats.docx
Normal file
Binary file not shown.
@ -1,111 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HNSWStats {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HNSWStats(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HNSWStats obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HNSWStats(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setN1(long value) {
|
||||
swigfaissJNI.HNSWStats_n1_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getN1() {
|
||||
return swigfaissJNI.HNSWStats_n1_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setN2(long value) {
|
||||
swigfaissJNI.HNSWStats_n2_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getN2() {
|
||||
return swigfaissJNI.HNSWStats_n2_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setN3(long value) {
|
||||
swigfaissJNI.HNSWStats_n3_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getN3() {
|
||||
return swigfaissJNI.HNSWStats_n3_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setNdis(long value) {
|
||||
swigfaissJNI.HNSWStats_ndis_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getNdis() {
|
||||
return swigfaissJNI.HNSWStats_ndis_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setNreorder(long value) {
|
||||
swigfaissJNI.HNSWStats_nreorder_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getNreorder() {
|
||||
return swigfaissJNI.HNSWStats_nreorder_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HNSWStats(long n1, long n2, long n3, long ndis, long nreorder) {
|
||||
this(swigfaissJNI.new_HNSWStats__SWIG_0(n1, n2, n3, ndis, nreorder), true);
|
||||
}
|
||||
|
||||
public HNSWStats(long n1, long n2, long n3, long ndis) {
|
||||
this(swigfaissJNI.new_HNSWStats__SWIG_1(n1, n2, n3, ndis), true);
|
||||
}
|
||||
|
||||
public HNSWStats(long n1, long n2, long n3) {
|
||||
this(swigfaissJNI.new_HNSWStats__SWIG_2(n1, n2, n3), true);
|
||||
}
|
||||
|
||||
public HNSWStats(long n1, long n2) {
|
||||
this(swigfaissJNI.new_HNSWStats__SWIG_3(n1, n2), true);
|
||||
}
|
||||
|
||||
public HNSWStats(long n1) {
|
||||
this(swigfaissJNI.new_HNSWStats__SWIG_4(n1), true);
|
||||
}
|
||||
|
||||
public HNSWStats() {
|
||||
this(swigfaissJNI.new_HNSWStats__SWIG_5(), true);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
swigfaissJNI.HNSWStats_reset(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void combine(HNSWStats other) {
|
||||
swigfaissJNI.HNSWStats_combine(swigCPtr, this, HNSWStats.getCPtr(other), other);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,86 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HStackInvertedLists extends ReadOnlyInvertedLists {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected HStackInvertedLists(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.HStackInvertedLists_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HStackInvertedLists obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HStackInvertedLists(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setIls(SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t value) {
|
||||
swigfaissJNI.HStackInvertedLists_ils_set(swigCPtr, this, SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t getIls() {
|
||||
long cPtr = swigfaissJNI.HStackInvertedLists_ils_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t(cPtr, false);
|
||||
}
|
||||
|
||||
public HStackInvertedLists(int nil, SWIGTYPE_p_p_faiss__InvertedLists ils) {
|
||||
this(swigfaissJNI.new_HStackInvertedLists(nil, SWIGTYPE_p_p_faiss__InvertedLists.getCPtr(ils)), true);
|
||||
}
|
||||
|
||||
public long list_size(long list_no) {
|
||||
return swigfaissJNI.HStackInvertedLists_list_size(swigCPtr, this, list_no);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char get_codes(long list_no) {
|
||||
long cPtr = swigfaissJNI.HStackInvertedLists_get_codes(swigCPtr, this, list_no);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
public LongVector get_ids(long list_no) {
|
||||
return new LongVector(swigfaissJNI.HStackInvertedLists_get_ids(swigCPtr, this, list_no), false);
|
||||
}
|
||||
|
||||
public void prefetch_lists(LongVector list_nos, int nlist) {
|
||||
swigfaissJNI.HStackInvertedLists_prefetch_lists(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(list_nos.data()), list_nos, nlist);
|
||||
}
|
||||
|
||||
public void release_codes(long list_no, SWIGTYPE_p_unsigned_char codes) {
|
||||
swigfaissJNI.HStackInvertedLists_release_codes(swigCPtr, this, list_no, SWIGTYPE_p_unsigned_char.getCPtr(codes));
|
||||
}
|
||||
|
||||
public void release_ids(long list_no, LongVector ids) {
|
||||
swigfaissJNI.HStackInvertedLists_release_ids(swigCPtr, this, list_no, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids);
|
||||
}
|
||||
|
||||
public long get_single_id(long list_no, long offset) {
|
||||
return swigfaissJNI.HStackInvertedLists_get_single_id(swigCPtr, this, list_no, offset);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char get_single_code(long list_no, long offset) {
|
||||
long cPtr = swigfaissJNI.HStackInvertedLists_get_single_code(swigCPtr, this, list_no, offset);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,71 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputer16 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputer16(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputer16 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputer16(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.HammingComputer16_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.HammingComputer16_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA1(long value) {
|
||||
swigfaissJNI.HammingComputer16_a1_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA1() {
|
||||
return swigfaissJNI.HammingComputer16_a1_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HammingComputer16() {
|
||||
this(swigfaissJNI.new_HammingComputer16__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputer16(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputer16__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
swigfaissJNI.HammingComputer16_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.HammingComputer16_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,79 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputer20 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputer20(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputer20 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputer20(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.HammingComputer20_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.HammingComputer20_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA1(long value) {
|
||||
swigfaissJNI.HammingComputer20_a1_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA1() {
|
||||
return swigfaissJNI.HammingComputer20_a1_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA2(SWIGTYPE_p_uint32_t value) {
|
||||
swigfaissJNI.HammingComputer20_a2_set(swigCPtr, this, SWIGTYPE_p_uint32_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_uint32_t getA2() {
|
||||
return new SWIGTYPE_p_uint32_t(swigfaissJNI.HammingComputer20_a2_get(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public HammingComputer20() {
|
||||
this(swigfaissJNI.new_HammingComputer20__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputer20(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputer20__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
swigfaissJNI.HammingComputer20_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.HammingComputer20_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,87 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputer32 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputer32(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputer32 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputer32(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.HammingComputer32_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.HammingComputer32_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA1(long value) {
|
||||
swigfaissJNI.HammingComputer32_a1_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA1() {
|
||||
return swigfaissJNI.HammingComputer32_a1_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA2(long value) {
|
||||
swigfaissJNI.HammingComputer32_a2_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA2() {
|
||||
return swigfaissJNI.HammingComputer32_a2_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA3(long value) {
|
||||
swigfaissJNI.HammingComputer32_a3_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA3() {
|
||||
return swigfaissJNI.HammingComputer32_a3_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HammingComputer32() {
|
||||
this(swigfaissJNI.new_HammingComputer32__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputer32(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputer32__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
swigfaissJNI.HammingComputer32_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.HammingComputer32_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,63 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputer4 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputer4(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputer4 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputer4(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(SWIGTYPE_p_uint32_t value) {
|
||||
swigfaissJNI.HammingComputer4_a0_set(swigCPtr, this, SWIGTYPE_p_uint32_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_uint32_t getA0() {
|
||||
return new SWIGTYPE_p_uint32_t(swigfaissJNI.HammingComputer4_a0_get(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
public HammingComputer4() {
|
||||
this(swigfaissJNI.new_HammingComputer4__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputer4(SWIGTYPE_p_unsigned_char a, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputer4__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a, int code_size) {
|
||||
swigfaissJNI.HammingComputer4_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b) {
|
||||
return swigfaissJNI.HammingComputer4_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,119 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputer64 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputer64(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputer64 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputer64(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.HammingComputer64_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.HammingComputer64_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA1(long value) {
|
||||
swigfaissJNI.HammingComputer64_a1_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA1() {
|
||||
return swigfaissJNI.HammingComputer64_a1_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA2(long value) {
|
||||
swigfaissJNI.HammingComputer64_a2_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA2() {
|
||||
return swigfaissJNI.HammingComputer64_a2_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA3(long value) {
|
||||
swigfaissJNI.HammingComputer64_a3_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA3() {
|
||||
return swigfaissJNI.HammingComputer64_a3_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA4(long value) {
|
||||
swigfaissJNI.HammingComputer64_a4_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA4() {
|
||||
return swigfaissJNI.HammingComputer64_a4_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA5(long value) {
|
||||
swigfaissJNI.HammingComputer64_a5_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA5() {
|
||||
return swigfaissJNI.HammingComputer64_a5_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA6(long value) {
|
||||
swigfaissJNI.HammingComputer64_a6_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA6() {
|
||||
return swigfaissJNI.HammingComputer64_a6_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setA7(long value) {
|
||||
swigfaissJNI.HammingComputer64_a7_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA7() {
|
||||
return swigfaissJNI.HammingComputer64_a7_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HammingComputer64() {
|
||||
this(swigfaissJNI.new_HammingComputer64__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputer64(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputer64__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
swigfaissJNI.HammingComputer64_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.HammingComputer64_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,63 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputer8 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputer8(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputer8 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputer8(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA0(long value) {
|
||||
swigfaissJNI.HammingComputer8_a0_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getA0() {
|
||||
return swigfaissJNI.HammingComputer8_a0_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HammingComputer8() {
|
||||
this(swigfaissJNI.new_HammingComputer8__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputer8(SWIGTYPE_p_unsigned_char a, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputer8__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a, int code_size) {
|
||||
swigfaissJNI.HammingComputer8_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b) {
|
||||
return swigfaissJNI.HammingComputer8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,80 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputerDefault {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputerDefault(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputerDefault obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputerDefault(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA8(SWIGTYPE_p_unsigned_char value) {
|
||||
swigfaissJNI.HammingComputerDefault_a8_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_char getA8() {
|
||||
long cPtr = swigfaissJNI.HammingComputerDefault_a8_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
|
||||
}
|
||||
|
||||
public void setQuotient8(int value) {
|
||||
swigfaissJNI.HammingComputerDefault_quotient8_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getQuotient8() {
|
||||
return swigfaissJNI.HammingComputerDefault_quotient8_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setRemainder8(int value) {
|
||||
swigfaissJNI.HammingComputerDefault_remainder8_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getRemainder8() {
|
||||
return swigfaissJNI.HammingComputerDefault_remainder8_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HammingComputerDefault() {
|
||||
this(swigfaissJNI.new_HammingComputerDefault__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputerDefault(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputerDefault__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
swigfaissJNI.HammingComputerDefault_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.HammingComputerDefault_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,72 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputerM4 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputerM4(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputerM4 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputerM4(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA(SWIGTYPE_p_uint32_t value) {
|
||||
swigfaissJNI.HammingComputerM4_a_set(swigCPtr, this, SWIGTYPE_p_uint32_t.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_uint32_t getA() {
|
||||
long cPtr = swigfaissJNI.HammingComputerM4_a_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_uint32_t(cPtr, false);
|
||||
}
|
||||
|
||||
public void setN(int value) {
|
||||
swigfaissJNI.HammingComputerM4_n_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getN() {
|
||||
return swigfaissJNI.HammingComputerM4_n_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HammingComputerM4() {
|
||||
this(swigfaissJNI.new_HammingComputerM4__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputerM4(SWIGTYPE_p_unsigned_char a4, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputerM4__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a4), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a4, int code_size) {
|
||||
swigfaissJNI.HammingComputerM4_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a4), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.HammingComputerM4_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,72 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class HammingComputerM8 {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected HammingComputerM8(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(HammingComputerM8 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_HammingComputerM8(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setA(SWIGTYPE_p_unsigned_long value) {
|
||||
swigfaissJNI.HammingComputerM8_a_set(swigCPtr, this, SWIGTYPE_p_unsigned_long.getCPtr(value));
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_unsigned_long getA() {
|
||||
long cPtr = swigfaissJNI.HammingComputerM8_a_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_long(cPtr, false);
|
||||
}
|
||||
|
||||
public void setN(int value) {
|
||||
swigfaissJNI.HammingComputerM8_n_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getN() {
|
||||
return swigfaissJNI.HammingComputerM8_n_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public HammingComputerM8() {
|
||||
this(swigfaissJNI.new_HammingComputerM8__SWIG_0(), true);
|
||||
}
|
||||
|
||||
public HammingComputerM8(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
this(swigfaissJNI.new_HammingComputerM8__SWIG_1(SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size), true);
|
||||
}
|
||||
|
||||
public void set(SWIGTYPE_p_unsigned_char a8, int code_size) {
|
||||
swigfaissJNI.HammingComputerM8_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(a8), code_size);
|
||||
}
|
||||
|
||||
public int hamming(SWIGTYPE_p_unsigned_char b8) {
|
||||
return swigfaissJNI.HammingComputerM8_hamming(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b8));
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/IDSelector.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/IDSelector.docx
Normal file
Binary file not shown.
@ -1,43 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class IDSelector {
|
||||
private transient long swigCPtr;
|
||||
protected transient boolean swigCMemOwn;
|
||||
|
||||
protected IDSelector(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(IDSelector obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_IDSelector(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean is_member(long id) {
|
||||
return swigfaissJNI.IDSelector_is_member(swigCPtr, this, id);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,63 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class IDSelectorArray extends IDSelector {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected IDSelectorArray(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.IDSelectorArray_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(IDSelectorArray obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_IDSelectorArray(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setN(long value) {
|
||||
swigfaissJNI.IDSelectorArray_n_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getN() {
|
||||
return swigfaissJNI.IDSelectorArray_n_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setIds(LongVector value) {
|
||||
swigfaissJNI.IDSelectorArray_ids_set(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(value.data()), value);
|
||||
}
|
||||
|
||||
public LongVector getIds() {
|
||||
return new LongVector(swigfaissJNI.IDSelectorArray_ids_get(swigCPtr, this), false);
|
||||
}
|
||||
|
||||
public IDSelectorArray(long n, LongVector ids) {
|
||||
this(swigfaissJNI.new_IDSelectorArray(n, SWIGTYPE_p_long_long.getCPtr(ids.data()), ids), true);
|
||||
}
|
||||
|
||||
public boolean is_member(long id) {
|
||||
return swigfaissJNI.IDSelectorArray_is_member(swigCPtr, this, id);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,63 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class IDSelectorBatch extends IDSelector {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected IDSelectorBatch(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.IDSelectorBatch_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(IDSelectorBatch obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_IDSelectorBatch(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setNbits(int value) {
|
||||
swigfaissJNI.IDSelectorBatch_nbits_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getNbits() {
|
||||
return swigfaissJNI.IDSelectorBatch_nbits_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setMask(long value) {
|
||||
swigfaissJNI.IDSelectorBatch_mask_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getMask() {
|
||||
return swigfaissJNI.IDSelectorBatch_mask_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public IDSelectorBatch(long n, LongVector indices) {
|
||||
this(swigfaissJNI.new_IDSelectorBatch(n, SWIGTYPE_p_long_long.getCPtr(indices.data()), indices), true);
|
||||
}
|
||||
|
||||
public boolean is_member(long id) {
|
||||
return swigfaissJNI.IDSelectorBatch_is_member(swigCPtr, this, id);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,63 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class IDSelectorRange extends IDSelector {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected IDSelectorRange(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.IDSelectorRange_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(IDSelectorRange obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_IDSelectorRange(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setImin(long value) {
|
||||
swigfaissJNI.IDSelectorRange_imin_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getImin() {
|
||||
return swigfaissJNI.IDSelectorRange_imin_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setImax(long value) {
|
||||
swigfaissJNI.IDSelectorRange_imax_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getImax() {
|
||||
return swigfaissJNI.IDSelectorRange_imax_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public IDSelectorRange(long imin, long imax) {
|
||||
this(swigfaissJNI.new_IDSelectorRange(imin, imax), true);
|
||||
}
|
||||
|
||||
public boolean is_member(long id) {
|
||||
return swigfaissJNI.IDSelectorRange_is_member(swigCPtr, this, id);
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/ITQMatrix.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/ITQMatrix.docx
Normal file
Binary file not shown.
@ -1,76 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class ITQMatrix extends LinearTransform {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected ITQMatrix(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.ITQMatrix_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ITQMatrix obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_ITQMatrix(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setMax_iter(int value) {
|
||||
swigfaissJNI.ITQMatrix_max_iter_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getMax_iter() {
|
||||
return swigfaissJNI.ITQMatrix_max_iter_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setSeed(int value) {
|
||||
swigfaissJNI.ITQMatrix_seed_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getSeed() {
|
||||
return swigfaissJNI.ITQMatrix_seed_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setInit_rotation(DoubleVector value) {
|
||||
swigfaissJNI.ITQMatrix_init_rotation_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public DoubleVector getInit_rotation() {
|
||||
long cPtr = swigfaissJNI.ITQMatrix_init_rotation_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
|
||||
}
|
||||
|
||||
public ITQMatrix(int d) {
|
||||
this(swigfaissJNI.new_ITQMatrix__SWIG_0(d), true);
|
||||
}
|
||||
|
||||
public ITQMatrix() {
|
||||
this(swigfaissJNI.new_ITQMatrix__SWIG_1(), true);
|
||||
}
|
||||
|
||||
public void train(long n, SWIGTYPE_p_float x) {
|
||||
swigfaissJNI.ITQMatrix_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
|
||||
}
|
||||
|
||||
}
|
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/ITQTransform.docx
Normal file
BIN
ann/src/main/java/com/twitter/ann/faiss/swig/ITQTransform.docx
Normal file
Binary file not shown.
@ -1,106 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class ITQTransform extends VectorTransform {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected ITQTransform(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.ITQTransform_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ITQTransform obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_ITQTransform(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setMean(FloatVector value) {
|
||||
swigfaissJNI.ITQTransform_mean_set(swigCPtr, this, FloatVector.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public FloatVector getMean() {
|
||||
long cPtr = swigfaissJNI.ITQTransform_mean_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new FloatVector(cPtr, false);
|
||||
}
|
||||
|
||||
public void setDo_pca(boolean value) {
|
||||
swigfaissJNI.ITQTransform_do_pca_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public boolean getDo_pca() {
|
||||
return swigfaissJNI.ITQTransform_do_pca_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setItq(ITQMatrix value) {
|
||||
swigfaissJNI.ITQTransform_itq_set(swigCPtr, this, ITQMatrix.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public ITQMatrix getItq() {
|
||||
long cPtr = swigfaissJNI.ITQTransform_itq_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new ITQMatrix(cPtr, false);
|
||||
}
|
||||
|
||||
public void setMax_train_per_dim(int value) {
|
||||
swigfaissJNI.ITQTransform_max_train_per_dim_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getMax_train_per_dim() {
|
||||
return swigfaissJNI.ITQTransform_max_train_per_dim_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPca_then_itq(LinearTransform value) {
|
||||
swigfaissJNI.ITQTransform_pca_then_itq_set(swigCPtr, this, LinearTransform.getCPtr(value), value);
|
||||
}
|
||||
|
||||
public LinearTransform getPca_then_itq() {
|
||||
long cPtr = swigfaissJNI.ITQTransform_pca_then_itq_get(swigCPtr, this);
|
||||
return (cPtr == 0) ? null : new LinearTransform(cPtr, false);
|
||||
}
|
||||
|
||||
public ITQTransform(int d_in, int d_out, boolean do_pca) {
|
||||
this(swigfaissJNI.new_ITQTransform__SWIG_0(d_in, d_out, do_pca), true);
|
||||
}
|
||||
|
||||
public ITQTransform(int d_in, int d_out) {
|
||||
this(swigfaissJNI.new_ITQTransform__SWIG_1(d_in, d_out), true);
|
||||
}
|
||||
|
||||
public ITQTransform(int d_in) {
|
||||
this(swigfaissJNI.new_ITQTransform__SWIG_2(d_in), true);
|
||||
}
|
||||
|
||||
public ITQTransform() {
|
||||
this(swigfaissJNI.new_ITQTransform__SWIG_3(), true);
|
||||
}
|
||||
|
||||
public void train(long n, SWIGTYPE_p_float x) {
|
||||
swigfaissJNI.ITQTransform_train(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x));
|
||||
}
|
||||
|
||||
public void apply_noalloc(long n, SWIGTYPE_p_float x, SWIGTYPE_p_float xt) {
|
||||
swigfaissJNI.ITQTransform_apply_noalloc(swigCPtr, this, n, SWIGTYPE_p_float.getCPtr(x), SWIGTYPE_p_float.getCPtr(xt));
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
@ -1,59 +0,0 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 4.0.2
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package com.twitter.ann.faiss;
|
||||
|
||||
public class IVFPQSearchParameters extends IVFSearchParameters {
|
||||
private transient long swigCPtr;
|
||||
|
||||
protected IVFPQSearchParameters(long cPtr, boolean cMemoryOwn) {
|
||||
super(swigfaissJNI.IVFPQSearchParameters_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(IVFPQSearchParameters obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
swigfaissJNI.delete_IVFPQSearchParameters(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public void setScan_table_threshold(long value) {
|
||||
swigfaissJNI.IVFPQSearchParameters_scan_table_threshold_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public long getScan_table_threshold() {
|
||||
return swigfaissJNI.IVFPQSearchParameters_scan_table_threshold_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setPolysemous_ht(int value) {
|
||||
swigfaissJNI.IVFPQSearchParameters_polysemous_ht_set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public int getPolysemous_ht() {
|
||||
return swigfaissJNI.IVFPQSearchParameters_polysemous_ht_get(swigCPtr, this);
|
||||
}
|
||||
|
||||
public IVFPQSearchParameters() {
|
||||
this(swigfaissJNI.new_IVFPQSearchParameters(), true);
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user