1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-16 10:53:11 +01:00
MLEM/Docs/api/MLEM.Extensions.RandomExtensions.yml

762 lines
21 KiB
YAML
Raw Normal View History

2020-05-21 01:08:36 +02:00
### YamlMime:ManagedReference
items:
- uid: MLEM.Extensions.RandomExtensions
commentId: T:MLEM.Extensions.RandomExtensions
id: RandomExtensions
parent: MLEM.Extensions
children:
- MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,``0[])
- MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,System.Collections.Generic.IList{``0})
- MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry``1(System.Random,System.Collections.Generic.IList{``0},System.Func{``0,System.Int32})
langs:
- csharp
- vb
name: RandomExtensions
nameWithType: RandomExtensions
fullName: MLEM.Extensions.RandomExtensions
type: Class
source:
remote:
path: MLEM/Extensions/RandomExtensions.cs
branch: master
repo: https://github.com/Ellpeck/MLEM
id: RandomExtensions
path: ../MLEM/Extensions/RandomExtensions.cs
startLine: 5
assemblies:
- MLEM
namespace: MLEM.Extensions
syntax:
content: public static class RandomExtensions
content.vb: Public Module RandomExtensions
inheritance:
- System.Object
inheritedMembers:
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object,System.Object)
- System.Object.GetHashCode
- System.Object.GetType
- System.Object.MemberwiseClone
- System.Object.ReferenceEquals(System.Object,System.Object)
- System.Object.ToString
modifiers.csharp:
- public
- static
- class
modifiers.vb:
- Public
- Module
- uid: MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,``0[])
commentId: M:MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,``0[])
id: GetRandomEntry``1(System.Random,``0[])
isExtensionMethod: true
parent: MLEM.Extensions.RandomExtensions
langs:
- csharp
- vb
name: GetRandomEntry<T>(Random, T[])
nameWithType: RandomExtensions.GetRandomEntry<T>(Random, T[])
fullName: MLEM.Extensions.RandomExtensions.GetRandomEntry<T>(System.Random, T[])
type: Method
source:
remote:
path: MLEM/Extensions/RandomExtensions.cs
branch: master
repo: https://github.com/Ellpeck/MLEM
id: GetRandomEntry
path: ../MLEM/Extensions/RandomExtensions.cs
startLine: 14
assemblies:
- MLEM
namespace: MLEM.Extensions
summary: "\nGets a random entry from the given list with uniform chance.\n"
example: []
syntax:
content: public static T GetRandomEntry<T>(this Random random, params T[] entries)
parameters:
- id: random
type: System.Random
description: The random
- id: entries
type: '{T}[]'
description: The entries to choose from
typeParameters:
- id: T
description: The entries&apos; type
return:
type: '{T}'
description: A random entry
content.vb: >-
<ExtensionAttribute>
Public Shared Function GetRandomEntry(Of T)(random As Random, ParamArray entries As T()) As T
overload: MLEM.Extensions.RandomExtensions.GetRandomEntry*
nameWithType.vb: RandomExtensions.GetRandomEntry(Of T)(Random, T())
modifiers.csharp:
- public
- static
modifiers.vb:
- Public
- Shared
fullName.vb: MLEM.Extensions.RandomExtensions.GetRandomEntry(Of T)(System.Random, T())
name.vb: GetRandomEntry(Of T)(Random, T())
- uid: MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,System.Collections.Generic.IList{``0})
commentId: M:MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,System.Collections.Generic.IList{``0})
id: GetRandomEntry``1(System.Random,System.Collections.Generic.IList{``0})
isExtensionMethod: true
parent: MLEM.Extensions.RandomExtensions
langs:
- csharp
- vb
name: GetRandomEntry<T>(Random, IList<T>)
nameWithType: RandomExtensions.GetRandomEntry<T>(Random, IList<T>)
fullName: MLEM.Extensions.RandomExtensions.GetRandomEntry<T>(System.Random, System.Collections.Generic.IList<T>)
type: Method
source:
remote:
path: MLEM/Extensions/RandomExtensions.cs
branch: master
repo: https://github.com/Ellpeck/MLEM
id: GetRandomEntry
path: ../MLEM/Extensions/RandomExtensions.cs
startLine: 19
assemblies:
- MLEM
namespace: MLEM.Extensions
summary: "\nGets a random entry from the given list with uniform chance.\n"
example: []
syntax:
content: public static T GetRandomEntry<T>(this Random random, IList<T> entries)
parameters:
- id: random
type: System.Random
description: The random
- id: entries
type: System.Collections.Generic.IList{{T}}
typeParameters:
- id: T
description: The entries&apos; type
return:
type: '{T}'
description: A random entry
content.vb: >-
<ExtensionAttribute>
Public Shared Function GetRandomEntry(Of T)(random As Random, entries As IList(Of T)) As T
overload: MLEM.Extensions.RandomExtensions.GetRandomEntry*
nameWithType.vb: RandomExtensions.GetRandomEntry(Of T)(Random, IList(Of T))
modifiers.csharp:
- public
- static
modifiers.vb:
- Public
- Shared
fullName.vb: MLEM.Extensions.RandomExtensions.GetRandomEntry(Of T)(System.Random, System.Collections.Generic.IList(Of T))
name.vb: GetRandomEntry(Of T)(Random, IList(Of T))
- uid: MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry``1(System.Random,System.Collections.Generic.IList{``0},System.Func{``0,System.Int32})
commentId: M:MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry``1(System.Random,System.Collections.Generic.IList{``0},System.Func{``0,System.Int32})
id: GetRandomWeightedEntry``1(System.Random,System.Collections.Generic.IList{``0},System.Func{``0,System.Int32})
isExtensionMethod: true
parent: MLEM.Extensions.RandomExtensions
langs:
- csharp
- vb
name: GetRandomWeightedEntry<T>(Random, IList<T>, Func<T, Int32>)
nameWithType: RandomExtensions.GetRandomWeightedEntry<T>(Random, IList<T>, Func<T, Int32>)
fullName: MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry<T>(System.Random, System.Collections.Generic.IList<T>, System.Func<T, System.Int32>)
type: Method
source:
remote:
path: MLEM/Extensions/RandomExtensions.cs
branch: master
repo: https://github.com/Ellpeck/MLEM
id: GetRandomWeightedEntry
path: ../MLEM/Extensions/RandomExtensions.cs
startLine: 33
assemblies:
- MLEM
namespace: MLEM.Extensions
summary: "\nReturns a random entry from the given list based on the specified weight function.\nA higher weight for an entry increases its likeliness of being picked.\n"
example: []
syntax:
content: public static T GetRandomWeightedEntry<T>(this Random random, IList<T> entries, Func<T, int> weightFunc)
parameters:
- id: random
type: System.Random
description: The random
- id: entries
type: System.Collections.Generic.IList{{T}}
description: The entries to choose from
- id: weightFunc
type: System.Func{{T},System.Int32}
description: A function that applies weight to each entry
typeParameters:
- id: T
description: The entries&apos; type
return:
type: '{T}'
description: A random entry, based on the entries&apos; weight
content.vb: >-
<ExtensionAttribute>
Public Shared Function GetRandomWeightedEntry(Of T)(random As Random, entries As IList(Of T), weightFunc As Func(Of T, Integer)) As T
overload: MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry*
exceptions:
- type: System.IndexOutOfRangeException
commentId: T:System.IndexOutOfRangeException
description: If the weight function returns different weights for the same entry
nameWithType.vb: RandomExtensions.GetRandomWeightedEntry(Of T)(Random, IList(Of T), Func(Of T, Int32))
modifiers.csharp:
- public
- static
modifiers.vb:
- Public
- Shared
fullName.vb: MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry(Of T)(System.Random, System.Collections.Generic.IList(Of T), System.Func(Of T, System.Int32))
name.vb: GetRandomWeightedEntry(Of T)(Random, IList(Of T), Func(Of T, Int32))
references:
- uid: MLEM.Extensions
commentId: N:MLEM.Extensions
name: MLEM.Extensions
nameWithType: MLEM.Extensions
fullName: MLEM.Extensions
- uid: System.Object
commentId: T:System.Object
parent: System
isExternal: true
name: Object
nameWithType: Object
fullName: System.Object
- uid: System.Object.Equals(System.Object)
commentId: M:System.Object.Equals(System.Object)
parent: System.Object
isExternal: true
name: Equals(Object)
nameWithType: Object.Equals(Object)
fullName: System.Object.Equals(System.Object)
spec.csharp:
- uid: System.Object.Equals(System.Object)
name: Equals
nameWithType: Object.Equals
fullName: System.Object.Equals
isExternal: true
- name: (
nameWithType: (
fullName: (
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: )
nameWithType: )
fullName: )
spec.vb:
- uid: System.Object.Equals(System.Object)
name: Equals
nameWithType: Object.Equals
fullName: System.Object.Equals
isExternal: true
- name: (
nameWithType: (
fullName: (
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: )
nameWithType: )
fullName: )
- uid: System.Object.Equals(System.Object,System.Object)
commentId: M:System.Object.Equals(System.Object,System.Object)
parent: System.Object
isExternal: true
name: Equals(Object, Object)
nameWithType: Object.Equals(Object, Object)
fullName: System.Object.Equals(System.Object, System.Object)
spec.csharp:
- uid: System.Object.Equals(System.Object,System.Object)
name: Equals
nameWithType: Object.Equals
fullName: System.Object.Equals
isExternal: true
- name: (
nameWithType: (
fullName: (
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: ', '
nameWithType: ', '
fullName: ', '
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: )
nameWithType: )
fullName: )
spec.vb:
- uid: System.Object.Equals(System.Object,System.Object)
name: Equals
nameWithType: Object.Equals
fullName: System.Object.Equals
isExternal: true
- name: (
nameWithType: (
fullName: (
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: ', '
nameWithType: ', '
fullName: ', '
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: )
nameWithType: )
fullName: )
- uid: System.Object.GetHashCode
commentId: M:System.Object.GetHashCode
parent: System.Object
isExternal: true
name: GetHashCode()
nameWithType: Object.GetHashCode()
fullName: System.Object.GetHashCode()
spec.csharp:
- uid: System.Object.GetHashCode
name: GetHashCode
nameWithType: Object.GetHashCode
fullName: System.Object.GetHashCode
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
spec.vb:
- uid: System.Object.GetHashCode
name: GetHashCode
nameWithType: Object.GetHashCode
fullName: System.Object.GetHashCode
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
- uid: System.Object.GetType
commentId: M:System.Object.GetType
parent: System.Object
isExternal: true
name: GetType()
nameWithType: Object.GetType()
fullName: System.Object.GetType()
spec.csharp:
- uid: System.Object.GetType
name: GetType
nameWithType: Object.GetType
fullName: System.Object.GetType
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
spec.vb:
- uid: System.Object.GetType
name: GetType
nameWithType: Object.GetType
fullName: System.Object.GetType
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
- uid: System.Object.MemberwiseClone
commentId: M:System.Object.MemberwiseClone
parent: System.Object
isExternal: true
name: MemberwiseClone()
nameWithType: Object.MemberwiseClone()
fullName: System.Object.MemberwiseClone()
spec.csharp:
- uid: System.Object.MemberwiseClone
name: MemberwiseClone
nameWithType: Object.MemberwiseClone
fullName: System.Object.MemberwiseClone
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
spec.vb:
- uid: System.Object.MemberwiseClone
name: MemberwiseClone
nameWithType: Object.MemberwiseClone
fullName: System.Object.MemberwiseClone
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
- uid: System.Object.ReferenceEquals(System.Object,System.Object)
commentId: M:System.Object.ReferenceEquals(System.Object,System.Object)
parent: System.Object
isExternal: true
name: ReferenceEquals(Object, Object)
nameWithType: Object.ReferenceEquals(Object, Object)
fullName: System.Object.ReferenceEquals(System.Object, System.Object)
spec.csharp:
- uid: System.Object.ReferenceEquals(System.Object,System.Object)
name: ReferenceEquals
nameWithType: Object.ReferenceEquals
fullName: System.Object.ReferenceEquals
isExternal: true
- name: (
nameWithType: (
fullName: (
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: ', '
nameWithType: ', '
fullName: ', '
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: )
nameWithType: )
fullName: )
spec.vb:
- uid: System.Object.ReferenceEquals(System.Object,System.Object)
name: ReferenceEquals
nameWithType: Object.ReferenceEquals
fullName: System.Object.ReferenceEquals
isExternal: true
- name: (
nameWithType: (
fullName: (
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: ', '
nameWithType: ', '
fullName: ', '
- uid: System.Object
name: Object
nameWithType: Object
fullName: System.Object
isExternal: true
- name: )
nameWithType: )
fullName: )
- uid: System.Object.ToString
commentId: M:System.Object.ToString
parent: System.Object
isExternal: true
name: ToString()
nameWithType: Object.ToString()
fullName: System.Object.ToString()
spec.csharp:
- uid: System.Object.ToString
name: ToString
nameWithType: Object.ToString
fullName: System.Object.ToString
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
spec.vb:
- uid: System.Object.ToString
name: ToString
nameWithType: Object.ToString
fullName: System.Object.ToString
isExternal: true
- name: (
nameWithType: (
fullName: (
- name: )
nameWithType: )
fullName: )
- uid: System
commentId: N:System
isExternal: true
name: System
nameWithType: System
fullName: System
- uid: MLEM.Extensions.RandomExtensions.GetRandomEntry*
commentId: Overload:MLEM.Extensions.RandomExtensions.GetRandomEntry
name: GetRandomEntry
nameWithType: RandomExtensions.GetRandomEntry
fullName: MLEM.Extensions.RandomExtensions.GetRandomEntry
- uid: System.Random
commentId: T:System.Random
parent: System
isExternal: true
name: Random
nameWithType: Random
fullName: System.Random
- uid: '{T}[]'
isExternal: true
name: T[]
nameWithType: T[]
fullName: T[]
nameWithType.vb: T()
fullName.vb: T()
name.vb: T()
spec.csharp:
- name: T
nameWithType: T
fullName: T
- name: '[]'
nameWithType: '[]'
fullName: '[]'
spec.vb:
- name: T
nameWithType: T
fullName: T
- name: ()
nameWithType: ()
fullName: ()
- uid: '{T}'
commentId: '!:T'
definition: T
name: T
nameWithType: T
fullName: T
- uid: T
name: T
nameWithType: T
fullName: T
- uid: MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,``0[])
commentId: M:MLEM.Extensions.RandomExtensions.GetRandomEntry``1(System.Random,``0[])
isExternal: true
- uid: System.Collections.Generic.IList{{T}}
commentId: T:System.Collections.Generic.IList{``0}
parent: System.Collections.Generic
definition: System.Collections.Generic.IList`1
name: IList<T>
nameWithType: IList<T>
fullName: System.Collections.Generic.IList<T>
nameWithType.vb: IList(Of T)
fullName.vb: System.Collections.Generic.IList(Of T)
name.vb: IList(Of T)
spec.csharp:
- uid: System.Collections.Generic.IList`1
name: IList
nameWithType: IList
fullName: System.Collections.Generic.IList
isExternal: true
- name: <
nameWithType: <
fullName: <
- name: T
nameWithType: T
fullName: T
- name: '>'
nameWithType: '>'
fullName: '>'
spec.vb:
- uid: System.Collections.Generic.IList`1
name: IList
nameWithType: IList
fullName: System.Collections.Generic.IList
isExternal: true
- name: '(Of '
nameWithType: '(Of '
fullName: '(Of '
- name: T
nameWithType: T
fullName: T
- name: )
nameWithType: )
fullName: )
- uid: System.Collections.Generic.IList`1
commentId: T:System.Collections.Generic.IList`1
isExternal: true
name: IList<T>
nameWithType: IList<T>
fullName: System.Collections.Generic.IList<T>
nameWithType.vb: IList(Of T)
fullName.vb: System.Collections.Generic.IList(Of T)
name.vb: IList(Of T)
spec.csharp:
- uid: System.Collections.Generic.IList`1
name: IList
nameWithType: IList
fullName: System.Collections.Generic.IList
isExternal: true
- name: <
nameWithType: <
fullName: <
- name: T
nameWithType: T
fullName: T
- name: '>'
nameWithType: '>'
fullName: '>'
spec.vb:
- uid: System.Collections.Generic.IList`1
name: IList
nameWithType: IList
fullName: System.Collections.Generic.IList
isExternal: true
- name: '(Of '
nameWithType: '(Of '
fullName: '(Of '
- name: T
nameWithType: T
fullName: T
- name: )
nameWithType: )
fullName: )
- uid: System.Collections.Generic
commentId: N:System.Collections.Generic
isExternal: true
name: System.Collections.Generic
nameWithType: System.Collections.Generic
fullName: System.Collections.Generic
- uid: System.IndexOutOfRangeException
commentId: T:System.IndexOutOfRangeException
isExternal: true
- uid: MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry*
commentId: Overload:MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry
name: GetRandomWeightedEntry
nameWithType: RandomExtensions.GetRandomWeightedEntry
fullName: MLEM.Extensions.RandomExtensions.GetRandomWeightedEntry
- uid: System.Func{{T},System.Int32}
commentId: T:System.Func{``0,System.Int32}
parent: System
definition: System.Func`2
name: Func<T, Int32>
nameWithType: Func<T, Int32>
fullName: System.Func<T, System.Int32>
nameWithType.vb: Func(Of T, Int32)
fullName.vb: System.Func(Of T, System.Int32)
name.vb: Func(Of T, Int32)
spec.csharp:
- uid: System.Func`2
name: Func
nameWithType: Func
fullName: System.Func
isExternal: true
- name: <
nameWithType: <
fullName: <
- name: T
nameWithType: T
fullName: T
- name: ', '
nameWithType: ', '
fullName: ', '
- uid: System.Int32
name: Int32
nameWithType: Int32
fullName: System.Int32
isExternal: true
- name: '>'
nameWithType: '>'
fullName: '>'
spec.vb:
- uid: System.Func`2
name: Func
nameWithType: Func
fullName: System.Func
isExternal: true
- name: '(Of '
nameWithType: '(Of '
fullName: '(Of '
- name: T
nameWithType: T
fullName: T
- name: ', '
nameWithType: ', '
fullName: ', '
- uid: System.Int32
name: Int32
nameWithType: Int32
fullName: System.Int32
isExternal: true
- name: )
nameWithType: )
fullName: )
- uid: System.Func`2
commentId: T:System.Func`2
isExternal: true
name: Func<T, TResult>
nameWithType: Func<T, TResult>
fullName: System.Func<T, TResult>
nameWithType.vb: Func(Of T, TResult)
fullName.vb: System.Func(Of T, TResult)
name.vb: Func(Of T, TResult)
spec.csharp:
- uid: System.Func`2
name: Func
nameWithType: Func
fullName: System.Func
isExternal: true
- name: <
nameWithType: <
fullName: <
- name: T
nameWithType: T
fullName: T
- name: ', '
nameWithType: ', '
fullName: ', '
- name: TResult
nameWithType: TResult
fullName: TResult
- name: '>'
nameWithType: '>'
fullName: '>'
spec.vb:
- uid: System.Func`2
name: Func
nameWithType: Func
fullName: System.Func
isExternal: true
- name: '(Of '
nameWithType: '(Of '
fullName: '(Of '
- name: T
nameWithType: T
fullName: T
- name: ', '
nameWithType: ', '
fullName: ', '
- name: TResult
nameWithType: TResult
fullName: TResult
- name: )
nameWithType: )
fullName: )