Dryad/html/092201f1-5901-0976-887e-a1f...

54 lines
12 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp"><head><link rel="SHORTCUT ICON" href="./../icons/favicon.ico" /><style type="text/css">.OH_CodeSnippetContainerTabLeftActive, .OH_CodeSnippetContainerTabLeft,.OH_CodeSnippetContainerTabLeftDisabled { }.OH_CodeSnippetContainerTabRightActive, .OH_CodeSnippetContainerTabRight,.OH_CodeSnippetContainerTabRightDisabled { }.OH_footer { }</style><link rel="stylesheet" type="text/css" href="./../styles/branding.css" /><link rel="stylesheet" type="text/css" href="./../styles/branding-en-US.css" /><style type="text/css">
body
{
border-left:5px solid #e6e6e6;
overflow-x:scroll;
overflow-y:scroll;
}
</style><script src="./../scripts/branding.js" type="text/javascript"><!----></script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>DryadLinqQueryable.AverageAsQuery Method (IQueryable(Int32))</title><meta name="Language" content="en-us" /><meta name="Microsoft.Help.Id" content="M:Microsoft.Research.DryadLinq.DryadLinqQueryable.AverageAsQuery(System.Linq.IQueryable{System.Int32})" /><meta name="Description" content="Same as , but returns an &lt;&gt; containing a single element. Computes the average of a set of Int32 values in the input dataset." /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="BrandingAware" content="'true'" /><meta name="container" content="Microsoft.Research.DryadLinq" /><meta name="file" content="092201f1-5901-0976-887e-a1f961caaf66" /><meta name="guid" content="092201f1-5901-0976-887e-a1f961caaf66" /><meta name="SelfBranded" content="true" /></head><body onload="onLoad()" class="primary-mtps-offline-document"><div class="OH_outerDiv"><div class="OH_outerContent"><table class="TitleTable"><tr><td class="OH_tdTitleColumn">DryadLinqQueryable<span id="ID0EFBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EFBABAAA?vb=.|cpp=::|cs=.|fs=.|nu=.");
</script>AverageAsQuery Method (IQueryable<span id="ID0EDBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EDBABAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script>Int32<span id="ID0EBBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EBBABAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script>)</td><td class="OH_tdRunningTitleColumn">DryadLINQ documentation</td></tr></table><div id="mainSection"><div id="mainBody"><span class="introStyle"></span><div class="summary">
Same as <a href="http://msdn2.microsoft.com/en-us/library/bb361284" target="_blank">Average(IQueryable<span id="ID0EDFMAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EDFMAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script>Int32<span id="ID0EBFMAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EBFMAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script>)</a>, but returns an <a href="http://msdn2.microsoft.com/en-us/library/bb495796" target="_blank">IQueryable</a>&lt;<a href="http://msdn2.microsoft.com/en-us/library/643eft0t" target="_blank">Double</a>&gt;
containing a single element. Computes the average of a set of Int32 values in the input
dataset.
</div><p></p><strong>Namespace:</strong> <a href="efe6507e-9fd8-bbd3-8227-fd6ba9e289c1.htm" target="">Microsoft.Research.DryadLinq</a><br /><strong>Assembly:</strong> <span sdata="assembly">Microsoft.Research.DryadLinq</span> (in Microsoft.Research.DryadLinq.dll) Version: 0.1.1.0 (0.1.1.0)<div class="OH_CollapsibleAreaRegion"><div class="OH_regiontitle">Syntax</div><div class="OH_CollapsibleArea_HrDiv"><hr class="OH_CollapsibleArea_Hr" /></div></div><div class="OH_clear"></div><div id="snippetGroup_Syntax" class="code"><div id="ID0ECUCAAAAA" class="OH_CodeSnippetContainer"><div class="OH_CodeSnippetContainerTabs" id="ID0ECUCAAAAA_tabs"><div class="OH_CodeSnippetContainerTabLeftActive" id="ID0ECUCAAAAA_tabimgleft"></div><div id="ID0ECUCAAAAA_tab1" class="OH_CodeSnippetContainerTabActive" EnableCopyCode="true"><a href="#" onclick="javascript:ChangeTab('ID0ECUCAAAAA','C#','1','4');return false;">C#</a></div><div id="ID0ECUCAAAAA_tab2" class="OH_CodeSnippetContainerTab" EnableCopyCode="true"><a href="#" onclick="javascript:ChangeTab('ID0ECUCAAAAA','Visual Basic','2','4');return false;">VB</a></div><div id="ID0ECUCAAAAA_tab3" class="OH_CodeSnippetContainerTab" EnableCopyCode="true"><a href="#" onclick="javascript:ChangeTab('ID0ECUCAAAAA','Visual C++','3','4');return false;">C++</a></div><div id="ID0ECUCAAAAA_tab4" class="OH_CodeSnippetContainerTabDisabledNotFirst" EnableCopyCode="true" disabled="true"><a>F#</a></div><div class="OH_CodeSnippetContainerTabRight" id="ID0ECUCAAAAA_tabimgright"></div></div><div id="ID0ECUCAAAAA_codecollection" class="OH_CodeSnippetContainerCodeCollection"><div class="OH_CodeSnippetToolBar"><div class="OH_CodeSnippetToolBarText"><a id="ID0ECUCAAAAA_ViewColorized" href="#" onclick="javascript:ExchangeTitleContent('ID0ECUCAAAAA','4')" title="View Colorized" style="display: none">View Colorized</a><a id="ID0ECUCAAAAA_copycode" href="#" onclick="javascript:CopyToClipboard('ID0ECUCAAAAA','4')" title="Copy to Clipboard">Copy to Clipboard</a><a id="ID0ECUCAAAAA_PrintText" class="OH_PrintText" href="#" onclick="javascript:Print('ID0ECUCAAAAA','4')" title="Print">Print</a></div></div><div id="ID0ECUCAAAAA_code_Div1" class="OH_CodeSnippetContainerCode" style="display: block"><pre><span class="keyword">public</span> <span class="keyword">static</span> <span class="identifier">IQueryable</span>&lt;<span class="identifier">double</span>&gt; <span class="identifier">AverageAsQuery</span>(
<span class="keyword">this</span> <span class="identifier">IQueryable</span>&lt;<span class="identifier">int</span>&gt; <span class="parameter">source</span>
)</pre></div><div id="ID0ECUCAAAAA_code_Plain_Div1" class="OH_CodeSnippetContainerCode" style="display: none"><pre>public static IQueryable&lt;double&gt; AverageAsQuery(
this IQueryable&lt;int&gt; source
)</pre></div><div id="ID0ECUCAAAAA_code_Div2" class="OH_CodeSnippetContainerCode" style="display: none"><pre>&lt;<span class="identifier">ExtensionAttribute</span>&gt;
<span class="keyword">Public</span> <span class="keyword">Shared</span> <span class="keyword">Function</span> <span class="identifier">AverageAsQuery</span> (
<span class="parameter">source</span> <span class="keyword">As</span> <span class="identifier">IQueryable</span>(<span class="keyword">Of</span> <span class="identifier">Integer</span>)
) <span class="keyword">As</span> <span class="identifier">IQueryable</span>(<span class="keyword">Of</span> <span class="identifier">Double</span>)</pre></div><div id="ID0ECUCAAAAA_code_Plain_Div2" class="OH_CodeSnippetContainerCode" style="display: none"><pre>&lt;ExtensionAttribute&gt;
Public Shared Function AverageAsQuery (
source As IQueryable(Of Integer)
) As IQueryable(Of Double)</pre></div><div id="ID0ECUCAAAAA_code_Div3" class="OH_CodeSnippetContainerCode" style="display: none"><pre><span class="keyword">public</span>:
[<span class="identifier">ExtensionAttribute</span>]
<span class="keyword">static</span> <span class="identifier">IQueryable</span>&lt;<span class="identifier">double</span>&gt;^ <span class="identifier">AverageAsQuery</span>(
<span class="identifier">IQueryable</span>&lt;<span class="identifier">int</span>&gt;^ <span class="parameter">source</span>
)</pre></div><div id="ID0ECUCAAAAA_code_Plain_Div3" class="OH_CodeSnippetContainerCode" style="display: none"><pre>public:
[ExtensionAttribute]
static IQueryable&lt;double&gt;^ AverageAsQuery(
IQueryable&lt;int&gt;^ source
)</pre></div><div id="ID0ECUCAAAAA_code_Div4" class="OH_CodeSnippetContainerCode" style="display: none"><pre /></div><div id="ID0ECUCAAAAA_code_Plain_Div4" class="OH_CodeSnippetContainerCode" style="display: none"><pre /></div></div></div><script>addSpecificTextLanguageTagSet('ID0ECUCAAAAA');</script></div><div id="parameters"><h4 class="subHeading">Parameters</h4><dl paramName="source"><dt><span class="parameter">source</span></dt><dd>Type: <a href="http://msdn2.microsoft.com/en-us/library/bb351562" target="_blank">System.Linq<span id="ID0EBFAATCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EBFAATCAAAAA?vb=.|cpp=::|cs=.|fs=.|nu=.");
</script>IQueryable</a><span id="ID0EEAATCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EEAATCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><a href="http://msdn2.microsoft.com/en-us/library/td2s409d" target="_blank">Int32</a><span id="ID0ECAATCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ECAATCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script><br /><span>A set of Int32 values to calculate the average of</span></dd></dl></div><h4 class="subHeading">Return Value</h4>Type: <a href="http://msdn2.microsoft.com/en-us/library/bb351562" target="_blank">IQueryable</a><span id="ID0EPCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EPCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><a href="http://msdn2.microsoft.com/en-us/library/643eft0t" target="_blank">Double</a><span id="ID0ENCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ENCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script><br />The average of the values in the input dataset<h4 class="subHeading">Usage Note</h4>In Visual Basic and C#, you can call this method as an instance method on any object of type <a href="http://msdn2.microsoft.com/en-us/library/bb351562" target="_blank">IQueryable</a><span id="ID0EHCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EHCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><a href="http://msdn2.microsoft.com/en-us/library/td2s409d" target="_blank">Int32</a><span id="ID0EFCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EFCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script>. When you use instance method syntax to call this method, omit the first parameter. For more information, see <a href="http://msdn.microsoft.com/en-us/library/bb384936.aspx" target="_blank">Extension Methods (Visual Basic)</a> or <a href="http://msdn.microsoft.com/en-us/library/bb383977.aspx" target="_blank">Extension Methods (C# Programming Guide)</a>.<a name="seeAlsoSection"><!----></a><div class="OH_CollapsibleAreaRegion"><div class="OH_regiontitle">See Also</div><div class="OH_CollapsibleArea_HrDiv"><hr class="OH_CollapsibleArea_Hr" /></div></div><div class="OH_clear"></div><div class="seeAlsoStyle"><a href="6d67ec6b-96ed-0a8b-0ad4-1c0568c7bf91.htm" target="">DryadLinqQueryable Class</a></div><div class="seeAlsoStyle"><a href="1b4e9327-9b61-e353-0051-d36bb399ce3e.htm" target="">AverageAsQuery Overload</a></div><div class="seeAlsoStyle"><a href="efe6507e-9fd8-bbd3-8227-fd6ba9e289c1.htm" target="">Microsoft.Research.DryadLinq Namespace</a></div></div></div></div></div><div id="OH_footer" class="OH_footer"><p /><div class="OH_feedbacklink"><a href="mailto:?subject=DryadLINQ+documentation+DryadLinqQueryable.AverageAsQuery+Method+(IQueryable(Int32))+100+EN-US&amp;body=Your%20feedback%20is%20used%20to%20improve%20the%20documentation%20and%20the%20product.%20Your%20e-mail%20address%20will%20not%20be%20used%20for%20any%20other%20purpose%20and%20is%20disposed%20of%20after%20the%20issue%20you%20report%20is%20resolved.%20While%20working%20to%20resolve%20the%20issue%20that%20you%20report%2c%20you%20may%20be%20contacted%20via%20e-mail%20to%20get%20further%20details%20or%20clarification%20on%20the%20feedback%20you%20sent.%20After%20the%20issue%20you%20report%20has%20been%20addressed%2c%20you%20may%20receive%20an%20e-mail%20to%20let%20you%20know%20that%20your%20feedback%20has%20been%20addressed.">Send Feedback</a> on this topic.</div></div></body></html>