1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17// The data that is used to represent a BitVector. 18namespace libtextclassifier3; 19table BitVectorData { 20 dense_data:DenseBitVectorData; 21 sparse_data:SparseBitVectorData; 22} 23 24// A dense representation of a bit vector. 25namespace libtextclassifier3; 26table DenseBitVectorData { 27 // The bits. 28 data:[ubyte]; 29 30 // Number of bits in this bit vector. 31 size:int; 32} 33 34// A sparse representation of a bit vector. 35namespace libtextclassifier3; 36table SparseBitVectorData { 37 // A vector of sorted indices of elements that are 1. 38 sorted_indices_32:[int]; 39} 40 41