217 references to Repeat
CSharpSyntaxGenerator (1)
Grammar\GrammarGenerator.cs (1)
271=> Enumerable.Repeat(production, count);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (2)
77new("test", Enumerable.Repeat("test", 10000).ToArray()) 938new("test", Enumerable.Repeat("test", 10000).ToArray())
Microsoft.Build (1)
Evaluation\ItemSpec.cs (1)
487return Enumerable.Repeat(EscapingUtilities.UnescapeAll(TextFragment), 1);
Microsoft.CodeAnalysis.CSharp (1)
BoundTree\UnboundLambda.cs (1)
188parameterRefKinds.IsDefault ? Enumerable.Repeat(RefKind.None, parameterTypes.Length).ToImmutableArray() : parameterRefKinds,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
99[.. Enumerable.Repeat<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)])); 204? Enumerable.Repeat((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Microsoft.CodeAnalysis.CSharp.Features (1)
GenerateType\CSharpGenerateTypeService.cs (1)
476: Enumerable.Repeat<SyntaxNode>(null, state.SimpleName.Arity);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Runtime\CSharpForwardCancellationTokenToInvocationsFixer.TypeNameVisitor.cs (1)
142? Enumerable.Repeat((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
99[.. Enumerable.Repeat<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)])); 204? Enumerable.Repeat((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Microsoft.Data.Analysis.Tests (21)
ArrowIntegrationTests.cs (19)
49.Append("DoubleColumn", false, new DoubleArray.Builder().AppendRange(Enumerable.Repeat(1.0, 10)).Build()) 50.Append("FloatColumn", false, new FloatArray.Builder().AppendRange(Enumerable.Repeat(1.0f, 10)).Build()) 51.Append("ShortColumn", false, new Int16Array.Builder().AppendRange(Enumerable.Repeat((short)1, 10)).Build()) 52.Append("LongColumn", false, new Int64Array.Builder().AppendRange(Enumerable.Repeat((long)1, 10)).Build()) 53.Append("UIntColumn", false, new UInt32Array.Builder().AppendRange(Enumerable.Repeat((uint)1, 10)).Build()) 54.Append("UShortColumn", false, new UInt16Array.Builder().AppendRange(Enumerable.Repeat((ushort)1, 10)).Build()) 55.Append("ULongColumn", false, new UInt64Array.Builder().AppendRange(Enumerable.Repeat((ulong)1, 10)).Build()) 56.Append("ByteColumn", false, new Int8Array.Builder().AppendRange(Enumerable.Repeat((sbyte)1, 10)).Build()) 57.Append("UByteColumn", false, new UInt8Array.Builder().AppendRange(Enumerable.Repeat((byte)1, 10)).Build()) 58.Append("Date64Column", false, new Date64Array.Builder().AppendRange(Enumerable.Repeat(DateTime.Now, 10)).Build()) 100.Append(prependColumnNamesWith + "DoubleColumn", false, new DoubleArray.Builder().AppendRange(Enumerable.Repeat(1.0, 10)).Build()) 101.Append(prependColumnNamesWith + "FloatColumn", false, new FloatArray.Builder().AppendRange(Enumerable.Repeat(1.0f, 10)).Build()) 102.Append(prependColumnNamesWith + "ShortColumn", false, new Int16Array.Builder().AppendRange(Enumerable.Repeat((short)1, 10)).Build()) 103.Append(prependColumnNamesWith + "LongColumn", false, new Int64Array.Builder().AppendRange(Enumerable.Repeat((long)1, 10)).Build()) 104.Append(prependColumnNamesWith + "UIntColumn", false, new UInt32Array.Builder().AppendRange(Enumerable.Repeat((uint)1, 10)).Build()) 105.Append(prependColumnNamesWith + "UShortColumn", false, new UInt16Array.Builder().AppendRange(Enumerable.Repeat((ushort)1, 10)).Build()) 106.Append(prependColumnNamesWith + "ULongColumn", false, new UInt64Array.Builder().AppendRange(Enumerable.Repeat((ulong)1, 10)).Build()) 107.Append(prependColumnNamesWith + "ByteColumn", false, new Int8Array.Builder().AppendRange(Enumerable.Repeat((sbyte)1, 10)).Build()) 108.Append(prependColumnNamesWith + "UByteColumn", false, new UInt8Array.Builder().AppendRange(Enumerable.Repeat((byte)1, 10)).Build())
DataFrameTests.Utils.cs (1)
79var buffers = Enumerable.Repeat(new VBuffer<int>(5, new[] { 0, 1, 2, 3, 4 }), length).ToArray();
VBufferColumnTests.cs (1)
28var buffers = Enumerable.Repeat(new VBuffer<int>(5, new[] { 0, 1, 2, 3, 4 }), 10).ToArray();
Microsoft.Extensions.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
1119public IEnumerator<int> GetEnumerator() => Enumerable.Repeat(BaseValue, 1).GetEnumerator(); 1131public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.Repeat(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator();
Microsoft.Extensions.AI.Evaluation.NLP.Tests (20)
BLEUAlgorithmTests.cs (20)
79[.. Enumerable.Repeat("a", 11)], 80[.. Enumerable.Repeat("a", 8)], 82string[] hypothesis = [.. Enumerable.Repeat("a", 7)]; 89[.. Enumerable.Repeat("a", 11)], 90[.. Enumerable.Repeat("a", 8)], 91[.. Enumerable.Repeat("a", 6)], 92[.. Enumerable.Repeat("a", 7)], 94hypothesis = [.. Enumerable.Repeat("a", 7)]; 101[.. Enumerable.Repeat("a", 28)], 102[.. Enumerable.Repeat("a", 28)], 104hypothesis = [.. Enumerable.Repeat("a", 12)]; 111[.. Enumerable.Repeat("a", 13)], 112[.. Enumerable.Repeat("a", 2)], 114hypothesis = [.. Enumerable.Repeat("a", 12)]; 121[.. Enumerable.Repeat("a", 13)], 122[.. Enumerable.Repeat("a", 11)], 124hypothesis = [.. Enumerable.Repeat("a", 12)]; 131[.. Enumerable.Repeat("a", 11)], 132[.. Enumerable.Repeat("a", 13)], 134hypothesis = [.. Enumerable.Repeat("a", 12)];
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyServicePayloadUtilities.cs (1)
557normalizedPerTurnContext.InsertRange(0, Enumerable.Repeat<string?>(null, missingContextCount));
Microsoft.Extensions.AI.Integration.Tests (1)
ToolReductionTests.cs (1)
623_vector = Enumerable.Repeat(1f, dims).ToArray();
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (2)
1001(int? limit = null, DateTime? from = null) => Enumerable.Repeat(from ?? default, limit ?? 4).Select(d => d.Year).ToArray(), 1034(int? limit = null, DateTime? from = null) => Enumerable.Repeat(from ?? default, limit ?? 4).Select(d => d.Year).ToArray(),
Microsoft.Extensions.DataIngestion.Tests (3)
Chunkers\NoOverlapTokenChunkerTests.cs (2)
23string text = string.Join(" ", Enumerable.Repeat("word", 600)); // each word is 1 token 43string text = string.Join(" ", Enumerable.Repeat("word", 1500)); // each word is 1 token
Chunkers\SectionChunkerTests.cs (1)
146string text = string.Join(" ", Enumerable.Repeat("word", 600)); // each word is 1 token
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\RandomStringGenerator.cs (1)
19.Repeat(Chars, length)
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
HttpClientFactory.cs (2)
82options.Groups = Enumerable.Repeat(0, routes).Select(_ => 105options.Groups = Enumerable.Repeat(0, routes).Select(_ =>
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\DnsPrimitivesTests.cs (1)
185byte[] data = Enumerable.Repeat(labelData, 3).SelectMany(x => x).Concat(lastLabelData).Concat(new byte[1]).ToArray();
Microsoft.Maui.Controls (2)
TemplatedItemsList.cs (2)
1004 _templatedObjects.InsertRange(_templatedObjects.Count, Enumerable.Repeat<TItem>(null, maxindex - _templatedObjects.Count)); 1014 _templatedObjects.InsertRange(e.NewStartingIndex, Enumerable.Repeat<TItem>(null, e.NewItems.Count));
Microsoft.Maui.Controls.Build.Tasks (5)
ModuleDefinitionExtensions.cs (5)
52 var ctorKey = $"{type}.ctor({(string.Join(",", Enumerable.Repeat("_", paramCount)))})"; 58 var ctorKey = $"{type}.ctor({(string.Join(",", Enumerable.Repeat("_", paramCount)))})"; 64 var ctorKey = $"{type}<{(string.Join(",", classArguments))}>.ctor({(string.Join(",", Enumerable.Repeat("_", paramCount)))})"; 70 var ctorKey = $"{type}<{string.Join(",", classArguments.Select(SerializeTypeReference))}>.ctor({(string.Join(",", Enumerable.Repeat("_", paramCount)))})"; 220 var methodKey = $"{(isStatic ? "static " : "")}{type}<{(classArguments == null ? "" : string.Join(",", classArguments))}>.({(string.Join(",", Enumerable.Repeat("_", paramCount)))})";
Microsoft.ML.AutoML.Samples (2)
AutoMLExperiment.cs (1)
100Features = Enumerable.Repeat(label, 50)
Sweepable\SweepableLightGBMBinaryExperiment.cs (1)
127Features = Enumerable.Repeat(label, 50)
Microsoft.ML.AutoML.Tests (2)
TunerTests.cs (2)
176var invalidLosses = Enumerable.Repeat(new[] { double.NaN, double.NegativeInfinity, double.PositiveInfinity }, 100) 211var zeroLosses = Enumerable.Repeat(0.0, 100);
Microsoft.ML.Core (1)
Utilities\Utils.cs (1)
844invMap = Enumerable.Repeat(-1, lim).ToArray<int>();
Microsoft.ML.Data (10)
DataView\DataViewExtensions.cs (1)
44return dv.GetRowCursor(Enumerable.Repeat(columnNeeded, 1));
Scorers\FeatureContributionCalculation.cs (1)
361return Enumerable.Repeat(FeatureColumn, 1);
Scorers\SchemaBindablePredictorWrapper.cs (2)
225return Enumerable.Repeat(InputRoleMappedSchema.Feature.Value, 1); 545return Enumerable.Repeat(InputRoleMappedSchema.Feature.Value, 1);
Transforms\NormalizeColumnDbl.cs (3)
702nodeProtoWrapper.AddAttribute("offset", Enumerable.Repeat(Offset, featureCount)); 703nodeProtoWrapper.AddAttribute("scale", Enumerable.Repeat(Scale, featureCount)); 777node.AddAttribute("offset", Enumerable.Repeat<TFloat>(0, featureCount));
Transforms\NormalizeColumnSng.cs (3)
860node.AddAttribute("offset", Enumerable.Repeat(Offset, featureCount)); 861node.AddAttribute("scale", Enumerable.Repeat(Scale, featureCount)); 934node.AddAttribute("offset", Enumerable.Repeat<TFloat>(0, featureCount));
Microsoft.ML.Ensemble (2)
PipelineEnsemble.cs (2)
145var predictorRow = Mappers[i].GetRow(pipelineRow, Enumerable.Repeat(Mappers[i].InputSchema[ScoreCols[i]], 1)); 186var inputColumns = Mappers[i].GetDependenciesForNewColumns(Enumerable.Repeat(weightCol, 1));
Microsoft.ML.FastTree (22)
Dataset\Dataset.cs (1)
392var truncatedActiveFeatures = Enumerable.Repeat(true, NumFeatures).ToArray();
Dataset\DatasetUtils.cs (1)
56Enumerable.Repeat(uvalToOrder[(uint)qid], skel.Boundaries[i + 1] - skel.Boundaries[i])));
Dataset\Feature.cs (1)
212: base(DenseIntArray.New(length, IntArrayType.Dense, 0, Enumerable.Repeat(0, length)))
GamModelParameters.cs (1)
450var splitFeatures = Enumerable.Repeat(featureIndex, numInternalNodes).ToArray();
Training\RegressionTreeNodeDocuments.cs (1)
54return Enumerable.Repeat(this, 1);
TreeEnsembleFeaturizer.cs (1)
370return Enumerable.Repeat(FeatureColumn, 1);
Utils\RegressionTreeBaseUtils.cs (16)
44treeWeightsList.AddRange(Enumerable.Repeat(treeWeights[i], trees[i].NumberOfNodes + trees[i].NumberOfLeaves)); 47treeId.AddRange(Enumerable.Repeat(i, trees[i].NumberOfNodes + trees[i].NumberOfLeaves)); 50isLeaf.AddRange(Enumerable.Repeat(new ReadOnlyMemory<char>("Tree node".ToCharArray()), trees[i].NumberOfNodes)); 51isLeaf.AddRange(Enumerable.Repeat(new ReadOnlyMemory<char>("Leaf node".ToCharArray()), trees[i].NumberOfLeaves)); 55leftChild.AddRange(Enumerable.Repeat(0, trees[i].NumberOfLeaves)); 59rightChild.AddRange(Enumerable.Repeat(0, trees[i].NumberOfLeaves)); 63numericalSplitFeatureIndexes.AddRange(Enumerable.Repeat(0, trees[i].NumberOfLeaves)); 67numericalSplitThresholds.AddRange(Enumerable.Repeat(0f, trees[i].NumberOfLeaves)); 71categoricalSplitFlags.AddRange(Enumerable.Repeat(false, trees[i].NumberOfLeaves)); 74leafValues.AddRange(Enumerable.Repeat(0d, trees[i].NumberOfNodes)); 79splitGains.AddRange(Enumerable.Repeat(0d, trees[i].NumberOfLeaves)); 94categoricalSplitFeatures.AddRange(Enumerable.Repeat(new VBuffer<int>(), trees[i].NumberOfLeaves)); 95categoricalCategoricalSplitFeatureRange.AddRange(Enumerable.Repeat(new VBuffer<int>(), trees[i].NumberOfLeaves)); 99builder.AddColumn("Bias", NumberDataViewType.Double, Enumerable.Repeat(bias, numberOfRows).ToArray()); 124leafSamples.AddRange(Enumerable.Repeat(new VBuffer<double>(), quantileTrees[i].NumberOfNodes)); 125leafSampleWeights.AddRange(Enumerable.Repeat(new VBuffer<double>(), quantileTrees[i].NumberOfNodes));
Microsoft.ML.GenAI.Core (2)
Trainer\CausalLMDataset.cs (2)
90var label = Enumerable.Repeat(-100L, train.Length).Concat([labelIds[i]]).Skip(1).ToArray(); 91var mask = Enumerable.Repeat(1L, train.Length).ToArray();
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
163return new string(Enumerable.Repeat(chars, length)
Microsoft.ML.Samples (70)
Dynamic\Trainers\BinaryClassification\AveragedPerceptron.cs (1)
99Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\AveragedPerceptronWithOptions.cs (1)
110Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\FactorizationMachine.cs (1)
107Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\FastForest.cs (1)
102Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\FastForestWithOptions.cs (1)
114Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\FastTree.cs (1)
105Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\FastTreeWithOptions.cs (1)
117Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegression.cs (1)
102Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LbfgsLogisticRegressionWithOptions.cs (1)
111Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LdSvm.cs (1)
99Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LdSvmWithOptions.cs (1)
108Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LightGbm.cs (1)
102Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LightGbmWithOptions.cs (1)
113Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LinearSvm.cs (1)
99Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\LinearSvmWithOptions.cs (1)
108Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\PriorTrainer.cs (1)
99Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegression.cs (1)
107Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaLogisticRegressionWithOptions.cs (1)
119Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaNonCalibrated.cs (1)
106Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SdcaNonCalibratedWithOptions.cs (1)
121Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SgdCalibrated.cs (1)
99Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SgdCalibratedWithOptions.cs (1)
111Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SgdNonCalibrated.cs (1)
99Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SgdNonCalibratedWithOptions.cs (1)
108Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegression.cs (1)
102Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\BinaryClassification\SymbolicSgdLogisticRegressionWithOptions.cs (1)
111Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\Clustering\KMeans.cs (1)
106Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\Clustering\KMeansWithOptions.cs (1)
114Features = Enumerable.Repeat(label, 50)
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropy.cs (1)
104Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\LbfgsMaximumEntropyWithOptions.cs (1)
112Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\LightGbm.cs (1)
107Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\LightGbmWithOptions.cs (1)
117Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\LogLossPerClass.cs (1)
87Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\NaiveBayes.cs (1)
112Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\OneVersusAll.cs (1)
105Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\PairwiseCoupling.cs (1)
105Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropy.cs (1)
111Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaMaximumEntropyWithOptions.cs (1)
121Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibrated.cs (1)
112Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\MulticlassClassification\SdcaNonCalibratedWithOptions.cs (1)
121Features = Enumerable.Repeat(label, 20)
Dynamic\Trainers\Ranking\FastTree.cs (1)
86Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Ranking\FastTreeWithOptions.cs (1)
100Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Ranking\LightGbm.cs (1)
86Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Ranking\LightGbmWithOptions.cs (1)
101Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\FastForest.cs (1)
83Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\FastForestWithOptions.cs (1)
96Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\FastTree.cs (1)
83Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\FastTreeTweedie.cs (1)
83Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\FastTreeTweedieWithOptions.cs (1)
98Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\FastTreeWithOptions.cs (1)
99Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\Gam.cs (1)
83Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\GamWithOptions.cs (1)
94Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\LbfgsPoissonRegression.cs (1)
81Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\LbfgsPoissonRegressionWithOptions.cs (1)
95Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\LightGbm.cs (1)
84Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\LightGbmWithOptions.cs (1)
103Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\OnlineGradientDescent.cs (1)
72Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\OnlineGradientDescentWithOptions.cs (1)
88Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\OrdinaryLeastSquares.cs (1)
80Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\OrdinaryLeastSquaresWithOptions.cs (1)
92Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\Sdca.cs (1)
80Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Trainers\Regression\SdcaWithOptions.cs (1)
96Features = Enumerable.Repeat(label, 50).Select(
Dynamic\Transforms\ImageAnalytics\ConvertToImage.cs (1)
102Features = Enumerable.Repeat(0,
Dynamic\Transforms\TreeFeaturization\FastForestBinaryFeaturizationWithOptions.cs (1)
136Features = Enumerable.Repeat(label, 3).Select(x => x ?
Dynamic\Transforms\TreeFeaturization\FastForestRegressionFeaturizationWithOptions.cs (1)
134Features = Enumerable.Repeat(label, 3).Select(x => x +
Dynamic\Transforms\TreeFeaturization\FastTreeBinaryFeaturizationWithOptions.cs (1)
138Features = Enumerable.Repeat(label, 3).Select(x => x ?
Dynamic\Transforms\TreeFeaturization\FastTreeRankingFeaturizationWithOptions.cs (1)
135Features = Enumerable.Repeat(label, 3).Select(x => randomFloat()
Dynamic\Transforms\TreeFeaturization\FastTreeRegressionFeaturizationWithOptions.cs (1)
134Features = Enumerable.Repeat(label, 3).Select(x => x +
Dynamic\Transforms\TreeFeaturization\FastTreeTweedieFeaturizationWithOptions.cs (1)
134Features = Enumerable.Repeat(label, 3).Select(x => x +
Dynamic\Transforms\TreeFeaturization\PretrainedTreeEnsembleFeaturizationWithOptions.cs (1)
145Features = Enumerable.Repeat(label, 3).Select(x => x ?
Microsoft.ML.SearchSpace (4)
Option\ChoiceOption.cs (1)
34Default = Enumerable.Repeat(0.0, FeatureSpaceDim).ToArray();
Option\UniformNumericOption.cs (1)
32Default = Enumerable.Repeat(0.0, FeatureSpaceDim).ToArray();
SearchSpace.cs (1)
155var featureSpace = Enumerable.Repeat(0.5, FeatureSpaceDim).ToArray();
Tuner\RandomTuner.cs (1)
34var featureVec = Enumerable.Repeat(0, d).Select(i => _rnd.NextDouble()).ToArray();
Microsoft.ML.Sweeper (1)
Algorithms\KdoSweeper.cs (1)
251double[] stddevs = Enumerable.Repeat(_args.Simple ? 0.2 : bandwidthScale, mu.Length).ToArray();
Microsoft.ML.Tests (2)
ImagesTests.cs (1)
1109Features = Enumerable.Repeat(0, InputSize).Select(x => random.NextDouble() * 100).ToArray()
TrainerEstimators\TreeEstimators.cs (1)
735Features = Enumerable.Repeat(label, 20)
Microsoft.ML.TimeSeries (3)
SeasonalityDetector.cs (1)
86FftUtils.ComputeForwardFft(inputRe, Enumerable.Repeat(0.0, length).ToArray(), fftRe, fftIm, length);
SrCnnAnomalyDetectionBase.cs (2)
181FftUtils.ComputeForwardFft(backAddList.ToArray(), Enumerable.Repeat(0.0f, length).ToArray(), fftRe, fftIm, length); 255backAddArray.AddRange(Enumerable.Repeat(predictedValue, Parent.BackAddWindowSize));
Microsoft.ML.TimeSeries.Tests (1)
TimeSeries.cs (1)
81File.WriteAllLines(pathData, Enumerable.Repeat("0", 50));
Microsoft.ML.Tokenizers (2)
Model\BertTokenizer.cs (2)
429mask.AddRange(Enumerable.Repeat(0, tokenIds.Count())); 433mask.AddRange(Enumerable.Repeat(0, additionalTokenIds.Count()));
Microsoft.ML.Tokenizers.Tests (4)
TiktokenTests.cs (2)
873string largeMixedInput = string.Join(" ", Enumerable.Repeat("Hello World! This is a test.", 50)); 916string inputMixed = string.Join(" ", Enumerable.Repeat("Hello World! Test123", length / 20 + 1)).Substring(0, length);
TokenizerTests.cs (2)
25string.Concat(Enumerable.Repeat("abcdefghijklmnopqrstuvwxyz", 100)), 26tokenizer.Decode(Enumerable.Repeat("abcdefghijklmnopqrstuvwxyz", 100).SelectMany(s => s.Select(c => c - 'a'))));
Microsoft.ML.TorchSharp (3)
Roberta\Models\RobertaModel.cs (3)
44Zeros = Enumerable.Repeat(0, options.MaxSequenceLength).ToArray(); 45Ones = Enumerable.Repeat(1, options.MaxSequenceLength).ToArray(); 46NegBillionPad = Enumerable.Repeat(negBillion, options.MaxSequenceLength).ToArray();
Microsoft.ML.Transforms (5)
MissingValueReplacing.cs (2)
890node.AddAttribute("imputed_value_floats", Enumerable.Repeat((float)_parent._repValues[iinfo], 1)); 896node.AddAttribute("imputed_value_floats", Enumerable.Repeat((float)_parent._repValues[iinfo], 1));
Text\WordEmbeddingsExtractor.cs (3)
427tensorD.AddRange(Enumerable.Repeat(0.0f, _parent._currentVocab.Dimension)); 429tensorD.AddRange(Enumerable.Repeat(float.MaxValue, _parent._currentVocab.Dimension)); 431tensorD.AddRange(Enumerable.Repeat(float.MinValue, _parent._currentVocab.Dimension));
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
ScopedCss\ConcatenateCssFiles.cs (1)
64var prefix = string.Join("/", Enumerable.Repeat("..", currentBasePathSegments.Length));
ScopedCss\ConcatenateCssFiles50.cs (1)
64var prefix = string.Join("/", Enumerable.Repeat("..", currentBasePathSegments.Length));
Microsoft.TemplateEngine.Utils (1)
FileSystemInfoExtensions.cs (1)
103segments.InsertRange(0, Enumerable.Repeat("..", revIndex));
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (2)
99[.. Enumerable.Repeat<ExpressionSyntax>(OmittedArraySizeExpression(), arrayType.Rank)])); 204? Enumerable.Repeat((TypeSyntax)OmittedTypeArgument(), symbol.TypeArguments.Length)
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
1119public IEnumerator<int> GetEnumerator() => Enumerable.Repeat(BaseValue, 1).GetEnumerator(); 1131public IEnumerator<KeyValuePair<string, int>> GetEnumerator() => Enumerable.Repeat(new KeyValuePair<string, int>(nameof(BaseValue), BaseValue), 1).GetEnumerator();
System.Linq (1)
System\Linq\Sequence.cs (1)
70return Repeat(start, 1);