nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / Index

Index

Full name Microsoft.VisualBasic.ComponentModel.Collection.Index`1 Assembly Microsoft.VisualBasic.Runtime Members 39

Mappings of key As String -> index As Integer

00 Remarks

2017-12-10

经过测试,字典对象是完全可以容纳UniProt数据库之中的物种的数量上限的

Type Parameters
NameDescription
T

01 Syntax

Microsoft.VisualBasic.ComponentModel.Collection.Index`1

02 Methods

NameOverloadsSummary
.ctor 3
EnumerateMapKeys 1 与Index.Objects只读属性的功能相似,只不过这个函数是Linq枚举器模式
GetOrdinal 1 get element index
GetSynonymOrdinal 1
Delete 2 just removes the key, the index ordinal offset will not make any changes
NotExists 1 For Linq where
Add 3 insert the specific element into the specific location of the index
Clear 1 clear mapping and reset the index offset
ToString 1 Display the input source sequence.
op_Explicit 1 cast index to a dictionary mapping of object element value to its index value
op_Implicit 2 Create a index of target element array with index base zero
op_Addition 1 Add a new key to this index object.
op_Subtraction 2 removes elements from list based on a given filter element list.
op_Like 1 item is one of the element in indexr
op_Equality 1 The element numbers in current index object is equals to given count number value?
op_GreaterThan 1 The element count inside current index object greater than the given count?
op_LessThan 1 The element count inside current index object smaller than the given count?
indexing 1 create a zero-based object index
Set 1
Intersect 1
AddList 1
GetEnumerator 1
op_Inequality 1
op_True 1
op_False 1

03 Properties

NameOverloadsSummary
Count 1 获取包含在Dictionary中的键/值对的数目。
Objects 1 Gets the input object keys that using for the construction of this index.
IndexOf 2 获取目标对象在本索引之中的位置编号,不存在则返回-1
Map 1 Returns the obj => index mapping table.

04 Fields

NameOverloadsSummary
index 1 list value will be set to nothing on Index.Delete())
base 1 the index offset value ,zero by default

05 Members

method .ctor overload 2 #
#ctor(IEnumerable(Of `0), Int32)

请注意,这里的数据源请尽量使用Distinct的,否则对于重复的数据,只会记录下第一个位置

Remarks

this constructor will create an empty index object if the given source input is nothing.

Parameters
NameTypeDescription
sourceIEnumerable(Of `0)

-

method .ctor overload 3 #
#ctor(Int32)

默认是从0开始的

Parameters
NameTypeDescription
baseInt32

-

method .ctor #
#ctor(IDictionary(Of `0, Int32), Int32)
Parameters
NameTypeDescription
mapsIDictionary(Of `0, Int32)

如果是json加载,可能会出现空值的字典

base%Int32

-

method EnumerateMapKeys #
EnumerateMapKeys

与Index.Objects只读属性的功能相似,只不过这个函数是Linq枚举器模式

method GetOrdinal #
GetOrdinal(IEnumerable(Of `0))

get element index

Parameters
NameTypeDescription
itemsIEnumerable(Of `0)

-

method GetSynonymOrdinal #
GetSynonymOrdinal(`0())
Parameters
NameTypeDescription
synonym`0()

-

Returns

this function returns -1 if synonym value is not found inside the index

method Delete #
Delete(`0)

just removes the key, the index ordinal offset will not make any changes

Parameters
NameTypeDescription
index`0

-

method Delete overload 2 #
Delete(`0())

just removes the key, the index ordinal offset will not make any changes

Parameters
NameTypeDescription
index`0()

-

method NotExists #
NotExists(`0)

For Linq where

Parameters
NameTypeDescription
x`0

-

method Add overload 2 #
Add(`0)

这个函数是线程不安全的

Remarks

this function will ignores of the existed duplicated item

Parameters
NameTypeDescription
x`0

-

Returns

这个函数所返回来的值是所添加的x的index值

method Add #
Add(`0, Int32)

insert the specific element into the specific location of the index

Parameters
NameTypeDescription
x`0

-

indexInt32

-

method Add overload 3 #
Add(`0())

add a collection of the unique items into current index object

Remarks

Please note that this function is a iterator function. which means your MUST call the ToArray or ToList method to execute this function, or the items will not be added into current index object.

Parameters
NameTypeDescription
x`0()

-

method Clear #
Clear

clear mapping and reset the index offset

method ToString #
ToString

Display the input source sequence.

method op_Explicit #
op_Explicit(Index(Of `0))

cast index to a dictionary mapping of object element value to its index value

Parameters
NameTypeDescription
indexIndex(Of `0)

-

method op_Implicit #
op_Implicit(`0())

Create a index of target element array with index base zero

Parameters
NameTypeDescription
objs`0()

-

method op_Implicit overload 2 #
op_Implicit(List(Of `0))

Create a index of target element array with index base zero

Parameters
NameTypeDescription
listList(Of `0)

-

method op_Addition #
op_Addition(Index(Of `0), `0)

Add a new key to this index object.

Parameters
NameTypeDescription
indexIndex(Of `0)

Element key index object.

element`0

-

method op_Subtraction overload 2 #
op_Subtraction(Index(Of `0), List(Of `0))

Delete items from source index and then returns the new modify index collection

Parameters
NameTypeDescription
indexIndex(Of `0)

-

listList(Of `0)

-

method op_Subtraction #
op_Subtraction(`0(), Index(Of `0))

removes elements from list based on a given filter element list.

Parameters
NameTypeDescription
list`0()

-

filterIndex(Of `0)

-

Returns

a new sequence that not have any elements inside the filter list.

method op_Like #
op_Like(`0, Index(Of `0))

item is one of the element in indexr

Parameters
NameTypeDescription
item`0

-

indexrIndex(Of `0)

-

method op_Equality #
op_Equality(Index(Of `0), Int32)

The element numbers in current index object is equals to given count number value?

Parameters
NameTypeDescription
indexIndex(Of `0)

-

count%Int32

-

method op_GreaterThan #
op_GreaterThan(Index(Of `0), Int32)

The element count inside current index object greater than the given count?

Parameters
NameTypeDescription
indexIndex(Of `0)

-

count%Int32

-

method op_LessThan #
op_LessThan(Index(Of `0), Int32)

The element count inside current index object smaller than the given count?

Parameters
NameTypeDescription
indexIndex(Of `0)

-

count%Int32

-

method indexing #
indexing(IEnumerable(Of `0))

create a zero-based object index

Parameters
NameTypeDescription
dataIEnumerable(Of `0)

-

property Count #
Count

获取包含在Dictionary中的键/值对的数目。

property Objects #
Objects

Gets the input object keys that using for the construction of this index.

Returns

an array of value copy of the map keys

property IndexOf #
IndexOf(`0)

获取目标对象在本索引之中的位置编号,不存在则返回-1

Parameters
NameTypeDescription
x`0

-

Returns

this function always returns -1(ignores of the Index.base offset value) if the target element is not found.

property IndexOf overload 2 #
IndexOf(Int32)

直接通过索引获取目标对象的值,请注意,如果T泛型类型是Int32, 则如果需要查找index的话,则必须要显式的指定参数名为x:=,否则调用的是当前的这个索引方法, 得到错误的结果

Parameters
NameTypeDescription
index%Int32

-

property Map #
Map

Returns the obj => index mapping table.

field index #
index

list value will be set to nothing on Index.Delete()

field base #
base

the index offset value ,zero by default

method Set #
Set(Int32, T)
method Intersect #
Intersect(IEnumerable(Of T))
method AddList #
AddList(T())
method GetEnumerator #
GetEnumerator()
method op_Inequality #
op_Inequality(Index(Of T), Int32)
method op_True #
op_True(Index(Of T))
method op_False #
op_False(Index(Of T))